parseJSON method

dynamic parseJSON(
  1. {Object? reviver(
    1. Object? key,
    2. Object? value
    )?}
)

De-string-ifies a JSON string back into a JSON object

You can optionally set a reviver function to deserialize non-basic types. See jsonDecode.

Example:

jsonString.parseJSON();
'[1, 2, 3]'.parseJSON(); // [1, 2, 3]

Implementation

dynamic parseJSON({Object? Function(Object? key, Object? value)? reviver}) {
  return jsonDecode(this, reviver: reviver);
}