Skip to content

Add a generator? #10

@enyo

Description

@enyo

We've started introducing codable to our codebase, and are rewriting a few API client libraries to use codable. It has become a very repetitive task, and we just thought that a generator would be ideal...

My initial idea is something like this:

  • Create a .json or .yaml file, that defines the properties for each message and its type
  • Define which class is in charge to decode/encode the message

The generator should then add the (camelized) names of the properties to the target class, and write the encode and decode methods for the specified class.

For types that are not native, it should be possible to specify a function that is in charge of en/decoding it.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    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