what is the header library for JSON in dart language? I need to parse from string and convert it into map.
var jsonData = JSON.parse('{"x":1, "y":2}');
what is the header library?
what is the header library for JSON in dart language? I need to parse from string and convert it into map.
var jsonData = JSON.parse('{"x":1, "y":2}');
what is the header library?
To parse JSON, you import dart:convert
and use json.decode
(or jsonDecode
, which is a just a shorthand for the former).