fromJson method
Populates message fields from JSON
Implementation
void fromJson(Map<String, dynamic> json) {
__.in_('fromJson');
try {
checkInitialized('BaseMessage');
json.forEach((key, value) {
if (hasField(key)) {
setField(key, value);
}
});
__.info('Populated from JSON');
} catch (e, stackTrace) {
__.severe('JSON population failed', e, stackTrace);
if (e is hujFrameworkException) {
rethrow;
}
throw hujFrameworkException(
message: 'JSON population failed',
hujType: hujErrorType.framework,
originalError: e,
);
} finally {
__.out_('fromJson');
}
}