What's the new syntax for the following please? :
Map mAcctData = JSON.parse(sResponse); // sResponse is Json String
parse (and stringify) has been moved to a top-level function.
import 'dart:json' as JSON; // note the JSON name
main() {
var text = // some text...
var map = JSON.parse(text); // using the JSON name
}
or
import 'dart:json'; // note, no JSON name
main() {
var text = // some text...
var map = parse(text); // calling parse as a top-level function.
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With