import 'dart:convert';
void main() {
var jsonString = '{"id": "p01", "name": "name 1", "price":4.5}';
var result = json.decode(jsonString);
print("id: " + result["id"]);
print("name: " + result["name"]);
print("price: " + result["price"].toString());
}
Output
id: p01
name: name 1
price: 4.5