Dart Classes for Models from JSON (Code Generation)

I have looked at this thread: https://groups.google.com/a/dartlang.org/forum/#!topic/misc/0pv-Uaq8FGI but still cannot find a solution for what I would like to have on client side (possibly on the server).

I guess there must be a way to provide a standard data structure format that is exposed as a JSON object in JS territory (like json schema or yaml or whatever) that can be used as input to create Dart classes that contain from a JSON constructor and a JSON method (maybe some validation for data ranges) that the developer can proceed with if additional logic is required for the data coming over the wire.

I don't want to use mirrors if possible, classes should be statically generated instead (i.e. run tool -> get class to match latest schema / input).

Can you point me in the right direction?

Thank.

+3
dart code-generation


source to share


No one has answered this question yet

See similar questions:

0
How to generate Dart code from JSON structure

or similar:

59
Warning: there is no class model to generate code in Visual Paradigm
57
How to automatically generate C # class file from JSON object string
3
Dart Code Generator
2
Readability of the generated code in a dart
1
Instantiating a generic class in a dart
1
dart test code
1
Creating a bot / crawler
1
Plugin architecture development
0
Are there any known improvements to the <-> Json Serialization class?
-3
HttpRequest with dart (broken / crashed language)



All Articles
Loading...
X
Show
Funny
Dev
Pics