Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpnurmi/jsonc.dart
JSON with comments and trailing commas
https://github.com/jpnurmi/jsonc.dart
dart json jsonc
Last synced: 24 days ago
JSON representation
JSON with comments and trailing commas
- Host: GitHub
- URL: https://github.com/jpnurmi/jsonc.dart
- Owner: jpnurmi
- License: bsd-3-clause
- Created: 2022-12-22T16:27:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-12T08:12:21.000Z (12 months ago)
- Last Synced: 2024-02-25T09:39:52.444Z (8 months ago)
- Topics: dart, json, jsonc
- Language: Dart
- Homepage: https://pub.dev/packages/jsonc
- Size: 2.2 MB
- Stars: 9
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonc.dart
[![pub](https://img.shields.io/pub/v/jsonc.svg)](https://pub.dev/packages/jsonc)
[![license: BSD](https://img.shields.io/badge/license-BSD-yellow.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![CI](https://github.com/ubuntu-flutter-community/jsonc.dart/actions/workflows/ci.yaml/badge.svg)](https://github.com/ubuntu-flutter-community/jsonc.dart/actions/workflows/ci.yaml)
[![codecov](https://codecov.io/gh/ubuntu-flutter-community/jsonc.dart/branch/main/graph/badge.svg?token=UPEXMCJDCN)](https://codecov.io/gh/ubuntu-flutter-community/jsonc.dart)JSON with comments and trailing commas.
```dart
import 'package:jsonc/jsonc.dart';
``````dart
final json = jsonc.decode('''
{
// one-line comment
"foo": "bar",
/*
* multi-line block comment
*/
"baz": "qux",
}
''');
print(json); // {foo: bar, baz: qux}
```