Jaguar-dart / jaguar_serializer

Format (JSON, XML, protobuf, mongodb, etc) and platform (server, client) agnostic serialization framework
172 stars 34 forks source link

Parsing with discriminator #178

Open jaumard opened 5 years ago

jaumard commented 5 years ago

In java I used this feature to parse json like this:

[
  { 
    type: 'myClass',...
  }, 
  { 
    type: 'myClass2',...
  }
]

it allow the parser to know which class to instantiate automatically, it's quite nice to have :)
Not sure it's already doable now with jaguar

tejainece commented 5 years ago

@jaumard We had this functionality before. I removed it because the API for it was all over the place.

I will reimplement the feature in a minimalistic way.