Questions tagged [dartson]

Dartson is a dart library which converts Dart Objects into their JSON representation. It helps you keep your code clean of fromJSON and toJSON functions by using dart:mirrors reflection.

Dartson is a Dart library that can be used to convert Dart objects into a JSON string. It uses dart:mirrors reflection to rebuild the schema. It also works in dart2js using code transformers.

Github

Documentation

4 questions
2
votes
2 answers

Stack Overflow in serializing to JSON an Object with double members

Trying to run this code to serialize an object in JSON using dartson generates a Stack Overflow exception when using a double value in a member. How can i solve this problem? import 'package:dartson/dartson.dart'; …
GioLaq
  • 2,489
  • 21
  • 26
1
vote
2 answers

Is it possible to extend classes and still use DSON Generator for Dart?

I have dart web app using sdk 1.24 and have been using dson: 0.11.0 to generate serializable classes/models for my objects that are being saved to a firestore database. I love the way the dson generated classes give me the ability to create a dart…
Jerry
  • 35
  • 2
1
vote
1 answer

Pubspec.yaml throwing inconsistent errors and no conflicts

I'm seeing an odd issue with Dartson & mongo_dart. I was running mongo_dart 0.1.46. - I need to upgrade it to mongo_dart 0.2.4 However, when i upgrade mongo_dart - i get the following error about dartson Package mongo_dart has no versions that…
Jack Murphy
  • 2,952
  • 1
  • 30
  • 49
0
votes
1 answer

Json Serialization with Dartson

Following the sample on the Dartson documentation page, import 'package:dartson/dartson.dart'; import 'package:some_dependency/some_class.dart'; import 'my_class.dart'; @Serializer( entities: [ MyClass, SomeClass, ], ) final…
Olantobi
  • 869
  • 1
  • 8
  • 16