jsonParserHelper static method
dynamic
jsonParserHelper(
- dynamic key,
- dynamic value
Json parser helper to read messages and converting data to native objects
Implementation
static dynamic jsonParserHelper(key, value) {
if (key == 'ts' &&
value is String &&
value.length >= 20 &&
value.length <= 24) {
var date = DateTime.parse(value);
return date;
} else if (key == 'acs' && value is Map) {
return AccessMode(value);
}
return value;
}