Closed mnordine closed 6 years ago
Given the following file:
import 'package:dartson/dartson.dart'; import 'dart:convert' show JSON; @Entity() class Parent { int id; } @Entity() class Child extends Parent { int blah; toString() => 'id: $id, blah: $blah'; } main() { final map = { 'id': 0, 'blah': 1 }; Child child = new Dartson.JSON().decode(JSON.encode(map), new Child()); print(child); }
It prints id: null, blah: 1
id: null, blah: 1
Is this not a duplicate of #7 ?
Supported in 1.0.0-alpha
Given the following file:
It prints
id: null, blah: 1