0

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?

Saranya Subramanian
  • 417
  • 1
  • 5
  • 19

1 Answers1

0

To parse JSON, you import dart:convert and use json.decode (or jsonDecode, which is a just a shorthand for the former).

lrn
  • 64,680
  • 7
  • 105
  • 121