parseJson function

JSON? parseJson(
  1. String input
)

Converts the given JSON-string input to its corresponding object.

For example:

final result = parseJson('{"a": 1, "b": [2, 3.4], "c": false}');
print(result.value);  // {a: 1, b: [2, 3.4], c: false}

Implementation

JSON parseJson(String input) => _jsonParser.parse(input).value;