Skip to content

jpnurmi/jsonc.dart

Repository files navigation

jsonc.dart

pub license: BSD CI codecov

JSON with comments and trailing commas.

import 'package:jsonc/jsonc.dart';
final json = jsonc.decode('''
{
  // one-line comment
  "foo": "bar",
  /*
   * multi-line block comment
   */
  "baz": "qux",
}
''');
print(json); // {foo: bar, baz: qux}