dart-json-mapper
dart-json-mapper copied to clipboard
Serialize / Deserialize Dart Objects to / from JSON
https://github.blog/changelog/2022-05-19-specify-theme-context-for-images-in-markdown-beta/
``` E/flutter (24684): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: It seems your class 'MaterialColor' has not been annotated with @jsonSerializable ``` i'm coming from the `json_serializable` package where these errors would instead occur...
Inspired by [this](https://github.com/google/json_serializable.dart/issues/964)
Given this code ```dart import 'package:dart_json_mapper/json_mapper.dart'; import 'package:dart_json_mapper/annotations.dart'; import 'main.reflectable.dart'; @jsonSerializable class TridaA { TridaA() { print("TridaA constructed"); } String prop; } void main() async { // inicializace reflektoru initializeReflectable();...
```dart @jsonSerializable class RawBean { String? name; @JsonProperty(raw: true) String? json; RawBean(this.name, this.json); } final bean = RawBean('My bean', '{"attr":false}'); ``` should produce: ```json { "name":"My bean", "json":{ "attr":false }...
Currently, when trying to call `JsonMapper.fromJson(object)` it may throw a runtime exception like: ``` Unhandled Exception: It seems your class 'SomeObject' has not been annotated with @jsonSerializable ``` This can...
analyzer is currently at version 6.4.0 while dart_json_mapper depends on ^5.4.0. This has made it impossible to keep riverpod up to date (which depends on ^6.0.0). Any chance of upgrading...
Have been struggling with running build_runner the last few weeks (after recent flutter update). Sometimes it works, most of the time it doesn't. I've been playing around with packages the...
Hello, I have these Dart class: ```dart @jsonSerializable class PageImpl { List? content; PageRequest? pageable; bool? empty; bool? first; bool? last; int? number; int? numberOfElements; int? size; Sort? sort; int?...