deprecatedJsonGet method

  1. @Deprecated('Use [JsonGet] instead. This method will be removed in v3.0.0.')
Future deprecatedJsonGet({
  1. required String key,
  2. String path = r'$',
})
inherited

JSON.GET key path ...

Return the value at path in JSON format. The returned JSON string is automatically decoded into a Dart Object.

key The key to retrieve. path The JSON path. Defaults to root ($).

Implementation

@Deprecated('Use [JsonGet] instead. This method will be removed in v3.0.0.')
Future<dynamic> deprecatedJsonGet({
  required String key,
  String path = r'$',
}) async {
  // Send command
  final result = await execute(<String>['JSON.GET', key, path]);

  if (result == null) return null;

  // Decode the response string back to a Dart Object (Map, List, etc.)
  return jsonDecode(result.toString());
}