json_traverse 0.0.1 copy "json_traverse: ^0.0.1" to clipboard
json_traverse: ^0.0.1 copied to clipboard

outdated

Parse deeply nested JSON using simple query strings.

JSON Traverser #

Traverse a deeply nested JSON with a query string. See the example below for syntax.

import 'package:json_traverse/json_traverse.dart';

void main() {
  String jsonString = """
  {
    "name": "John Smith",
    "email": "john@example.org",
    "contact": [
      "123",
      "456"
    ]
  }
  """;
  JSONTraverse traverser = JSONTraverse(jsonString);
  // for a single string
  print(traverser.query("name"));
  // for an array, point the index
  print(traverser.query("contact.1"));
}
5
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Parse deeply nested JSON using simple query strings.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on json_traverse