testJson method Null safety
Implementation
Future<void> testJson() async {
final Model<Operation> m = newModel();
final String s = json.encoder.convert(m.toJson());
m.decodeJson(json.decoder.convert(s) as Map<String, dynamic>,
needsSave: false);
await expect(
json.encoder.convert(m.toJson()), s); // It's not much of a test :-)
}