Skip to content

Switch objects from manual parsing to use Codable #161

@ryanbourneuk

Description

@ryanbourneuk

Expected Behaviour

Storm objects should be generated using Codable. This will allow us to use Swift object models to define the payload we're expecting, remove code that reduces type-safety, and allow errors to be easily surfaced when generating views at runtime.

Current Behaviour

Storm objects are generated with manual parsing / initialisation, removing type-safety and making issues harder to find.

Possible Solution

(only to be undertaken when test coverage is sufficient)

  • Update storm view objects to use Codable
  • Update storm localisation code to use Codable
  • Update storm page objects to use Codable
  • Update storm object generation to use Codable

Steps to Reproduce (for bugs)

Context

As part of the codable-refactor project, parts of the codebase (mainly storm object related) will be migrated from using manual JSON parsing / initialisation to using Codable. This will allow for increased type-safety, a reduction in boilerplate code, and the ability to easily surface errors when bundles are invalid.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions