hiranthaR / Json-to-Dart-Model

Json to Dart Model extension can convert JSON objects into Dart data classes. It supports pure Dart class conversion, Flutter-recommended JSON serialization using annotations, Freezed support, Effective Dart:Style, and many more features. Currently, it has more than 135,000 installs.
https://marketplace.visualstudio.com/items?itemName=hirantha.json-to-dart
MIT License
93 stars 17 forks source link

support jsonc $id $ref #106

Open xtsemeta opened 1 year ago

xtsemeta commented 1 year ago

Is there an existing issue for this?

Current Behavior

No response

Expected Behavior

**.jsonc { "$id":"path_to_class_or_any_unique_id_a",// id "__className":"ClassA", "id":"No.001", "name":"JsonToDart" } { "$id":"path_to_class_or_any_unique_id_b",// id "__className":"ClassB", "id":"No.002", "name":"JsonToDart", "key1":{"$ref":"path_to_class_or_any_unique_id_a"}, "key2":[{"$ref":"path_to_class_or_any_unique_id_a"}] }

**.dart class ClassA{ final String id; final String name;

... }

class ClassB{ final String id; final String name;

final ClassA key1; final List key2; ... }

Steps To Reproduce

No response

Version

No response

Relevant JSON syntax

No response

Anything else?

No response