jsonut 0.2.0 copy "jsonut: ^0.2.0" to clipboard
jsonut: ^0.2.0 copied to clipboard

A minimal utility kit for working with JSON in a typesafe manner.

example/main.dart

import 'package:jsonut/jsonut.dart';

void main() {
  const json = '''
  {
    "name": "John Doe",
    "age": 42,
    "student": false,
  }
  ''';

  final object = JsonObject.parse(json);

  print(object['name'].string()); // John Doe
  print(object['age'].number()); // 42
  print(object['student'].boolean()); // false

  // Example of a missing field.
  print(object['email'].stringOrNull()); // null
}
10
likes
0
pub points
34%
popularity

Publisher

verified publisherlurey.dev

A minimal utility kit for working with JSON in a typesafe manner.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on jsonut