{"action":"created","issue":{"url":"https://api.github.com/repos/eredo/dartson/issues/27","labels_url":"https://api.github.com/repos/eredo/dartson/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/eredo/dartson/issues/27/comments","events_url":"https://api.github.com/repos/eredo/dartson/issues/27/events","html_url":"https://github.com/eredo/dartson/issues/27","id":100480657,"number":27,"title":"Using double in num properties causing Stack Overflow","user":{"login":"eredo","id":1856202,"avatar_url":"https://avatars.githubusercontent.com/u/1856202?v=3","gravatar_id":"","url":"https://api.github.com/users/eredo","html_url":"https://github.com/eredo","followers_url":"https://api.github.com/users/eredo/followers","following_url":"https://api.github.com/users/eredo/following{/other_user}","gists_url":"https://api.github.com/users/eredo/gists{/gist_id}","starred_url":"https://api.github.com/users/eredo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eredo/subscriptions","organizations_url":"https://api.github.com/users/eredo/orgs","repos_url":"https://api.github.com/users/eredo/repos","events_url":"https://api.github.com/users/eredo/events{/privacy}","received_events_url":"https://api.github.com/users/eredo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eredo/dartson/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eredo/dartson/labels/confirmed","name":"confirmed","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-12T07:00:18Z","updated_at":"2015-10-31T19:47:13Z","closed_at":null,"body":"As mentioned in #26, the following code will fail:\r\n\r\n```dart\r\nimport 'package:dartson/dartson.dart';\r\n\r\n@Entity\r\nclass Example {\r\n  num takeDouble;\r\n}\r\n\r\nvoid main() {\r\n  var dson = new Dartson.JSON();\r\n  var jsonStr = dson.encode(new Example()..takeDouble = 1.11);\r\n\r\n  // this will work\r\n  var jsonStr2 = dson.encode(new Example()..takeDouble = 1);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/eredo/dartson/issues/comments/152766307","html_url":"https://github.com/eredo/dartson/issues/27#issuecomment-152766307","issue_url":"https://api.github.com/repos/eredo/dartson/issues/27","id":152766307,"user":{"login":"rightisleft","id":3611930,"avatar_url":"https://avatars.githubusercontent.com/u/3611930?v=3","gravatar_id":"","url":"https://api.github.com/users/rightisleft","html_url":"https://github.com/rightisleft","followers_url":"https://api.github.com/users/rightisleft/followers","following_url":"https://api.github.com/users/rightisleft/following{/other_user}","gists_url":"https://api.github.com/users/rightisleft/gists{/gist_id}","starred_url":"https://api.github.com/users/rightisleft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rightisleft/subscriptions","organizations_url":"https://api.github.com/users/rightisleft/orgs","repos_url":"https://api.github.com/users/rightisleft/repos","events_url":"https://api.github.com/users/rightisleft/events{/privacy}","received_events_url":"https://api.github.com/users/rightisleft/received_events","type":"User","site_admin":false},"created_at":"2015-10-31T19:47:13Z","updated_at":"2015-10-31T19:47:13Z","body":"the work around in #26 of using double also results in a stack overflow \r\n\r\n``` \r\n  double ccv;\r\n  double bZip;\r\n```\r\n\r\n```\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: isInfinite\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: isNaN\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: isNaN\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: isFinite\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: isFinite\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: sign\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: sign\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: runtimeType\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: runtimeType\r\nFINER: 2015-10-31 15:45:25.734: Serialization completed.\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: isNegative\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: isNegative\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: isInfinite\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: isInfinite\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: isNaN\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: isNaN\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: isFinite\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: isFinite\r\nFINER: 2015-10-31 15:45:25.734: Start serializing field: sign\r\nFINER: 2015-10-31 15:45:25.734: Property: null\r\nFINER: 2015-10-31 15:45:25.734: Serializing field: sign\r\nUnhandled exception:\r\nUncaught Error: Stack Overflow\r\nStack Trace:\r\n#0      DefaultSegmentRouter.handle.<handle_async_body> (package:shelf_route/src/default_segment_router.dart)\r\n#1      _asyncCatchHelper.<anonymous closure> (dart:core-patch/core_patch.dart:14)\r\n#2      _rootRunBinary (dart:async/zone.dart:923)\r\n#3      _CustomZone.runBinary (dart:async/zone.dart:819)\r\n#4      _Future._propagateToListeners.handleError (dart:async/future_impl.dart:521)\r\n#5      _Future._propagateToListeners (dart:async/future_impl.dart:580)\r\n#6      _Future._completeWithValue (dart:async/future_impl.dart:368)\r\n#7      _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:422)\r\n#8      _rootRun (dart:async/zone.dart:904)\r\n#9      _CustomZone.run (dart:async/zone.dart:803)\r\n#10     _CustomZone.runGuarded (dart:async/zone.dart:709)\r\n#11     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:734)\r\n#12     _microtaskLoop (dart:async/schedule_microtask.dart:43)\r\n#13     _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)\r\n#14     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)\r\n#15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)\r\n#16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)\r\n#17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)\r\n\r\n#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:895)\r\n#1      _microtaskLoop (dart:async/schedule_microtask.dart:43)\r\n#2      _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)\r\n#3      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)\r\n#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)\r\n\r\nProcess finished with exit code 255\r\n```"}}