fromJson method
Apply/Clone from json object
Implementation
void fromJson(Map<String, dynamic> jsonObj, {bool debug = false}) {
try {
// Deep copy to ensure [obj] won't be modified externally afterwards
obj = jsonDecode(jsonEncode(jsonObj));
if (debugLogJsonContent) {
lazy.log('$runtimeType.fromJson():${jsonObj.toString()}',
forced: debugLogJson || debug);
} else {
lazy.log('$runtimeType.fromJson():${jsonObj.toString().length}',
forced: debugLogJson || debug);
}
save(debugMsg: '$runtimeType.fromJson()');
} catch (e) {
lazy.log('$runtimeType.fromJson():catch():$e');
}
}