Skip to content

Support unmarshalling custom classes #20

@langsamu

Description

@langsamu

Thanks for a great library.

It would be a nice feature to be able to unmarshal to custom JavaScript classes.
I've implemented this in two ways:

  1. Rewrite Jsonix.Model.ClassInfo so unmarshal creates an instance of a custom class (instead of an empty object) to be used as the result if a type is defined in typeInfo.
    (7329373 and working example)
  2. Derive Jsonix.Model.CustomClassInfo from ClassInfo so unmarshal creates an instance of a custom class and extends it with attributes from super class' result.
    (0b79975 and working example)

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions