JSON
import 'dart:convert';
void main() {
var jsonString = """
{
"cats": {
"abysinnian": {
"origin": "Burma",
"behavior": "playful"
}
}
}
""";
var obj = JSON.decode(jsonString);
print(obj['cats']['abysinnian']['behavior']); // playful
}
請參閱 dartpad 上的示例: https ://dartpad.dartlang.org/7d5958cf10e611b36326f27b062108fe