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

outdated

Parse deeply nested JSON using simple query strings with dot separator.

example/example.dart

import 'package:json_traverse/json_traverse.dart';

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

Publisher

unverified uploader

Parse deeply nested JSON using simple query strings with dot separator.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

More

Packages that depend on json_traverse