json5 0.5.2 copy "json5: ^0.5.2" to clipboard
json5: ^0.5.2 copied to clipboard

outdated

JSON for dart and flutter (a port version of json5 in javascript)

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);
}
13
likes
0
pub points
85%
popularity

Publisher

unverified uploader

JSON for dart and flutter (a port version of json5 in javascript)

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on json5