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';
@MirrorsUsed(targets:const['example'], override:'*')
import 'dart:mirrors';
@Entity()
class GeoFence {
String label;
num latitude;
num longitude;
num radius;
}
main(List<String> args) {
var dson = new Dartson.JSON();
GeoFence object = new GeoFence()
..label = "test"
..latitude = 46.2
..longitude = 12
..radius = 10;
String jsonString = dson.encode(object);
print(jsonString);
}