simple_json
simple_json copied to clipboard
Simple way to dynamically convert from and to JSON using build-time generators given a type.
Hi, great work. May I suggest adding a parameter to the JsonObject annotation to override default naming conventions. such: ``` @JsonObject(fieldRename:FieldRename.snakeCase) class Person{ final firstName; } `` to make the...
I have been trying to generate the mapper.g.dart after configuring everything in the classes and I always get the same error. flutter pub run build_runner build --delete-conflicting-outputs --verbose ``` [SEVERE]...
milesIn: mapper.applyDynamicFromJsonConverter(json['milesIn'])!, I hope you don't abandon this project as I love it. The other solutions pollute the code with files everywhere. This is the only good solution.
status: mapper .deserialize(json['status'] as Map), this line crashes if status is null
NoSuchMethodError (NoSuchMethodError: Class 'DateTime' has no instance method 'toJson'. Receiver: Instance of 'DateTime' Tried calling: toJson())
The only lines that fix the bug are 'DateTime?': const DefaultISO8601DateConverter(), 'Duration?': const DefaultDurationConverter(), The rest is just package updates. Also, in pubspec.yaml I had to include the mapper with...
I'm seeing warnings for unnecessary parens, and prefer const in the example mapper.g.dart. I would be great to get this fixed. I like all my code to be clean and...