JSON.parse constructor

JSON.parse(
  1. String jsonStr
)

Parse json string as JSON object

Implementation

factory JSON.parse(String jsonStr) {
  if (jsonStr.isEmpty) {
    return JSON.nil;
  }
  return JSON(json.decode(jsonStr));
}