jsontree 0.1.1+1
jsontree: ^0.1.1+1 copied to clipboard
Statically typed JSON tree. The tree can contain JSON-compatible atomic types and nothing else.
example/example.dart
import 'package:jsontree/jsontree.dart';
void main() {
final tree = {
"planet": "Mars".jsonNode,
"diameter": 6779.jsonNode,
"satellites": ["Phobos".jsonNode, "Deimos".jsonNode].jsonNode
}.jsonNode;
print(tree.toJsonCode());
// {"planet":"Mars","diameter":6779,"satellites":["Phobos","Deimos"]}
}