json5 0.8.0 icon indicating copy to clipboard operation
json5: ^0.8.0 copied to clipboard

JSON5 for dart and flutter

example/main.dart

import 'package:json5/json5.dart';

void main() {
  var obj = JSON5.parse('{                '
      '  /*  comment block  */            '
      '  name: {first: "phat"},           '
      '  lang: ["C++", "dart", "kotlin"], '
      '  nums: [NaN, Infinity, -Infinity] '
      '} // end object                    ');

  var compact = JSON5.stringify(obj);

  print(compact);

  var pretty = JSON5.stringify(obj, space: 2);

  print(pretty);
}
7
likes
110
pub points
64%
popularity

Publisher

unverified uploader

JSON5 for dart and flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

More

Packages that depend on json5