jsonStrlen method
jsonStrlen
Implementation
Future<List<int?>> jsonStrlen(String key, {String path = '\$'}) async {
Object result = await _runWithRetryNew(() async {
return (await RespCommandsTier1(_client!)
.jsonStrlen(key: key, path: path));
});
if (result is RespType2<dynamic>) {
final result1 = result.toArray().payload;
if (result1 != null) {
return result1.map((item) {
if (item is RespType2<int>) {
return item.payload;
} else {
return null;
}
}).toList(growable: false);
}
return [];
}
final result1 = (result as RespType3<dynamic>).toArray().payload;
if (result1 != null) {
return result1.map((item) {
if (item is RespType3<int>) {
return item.payload;
} else {
return null;
}
}).toList(growable: false);
}
return [];
}