Skip to main content

jsonrepair_dart 0.1.2 copy "jsonrepair_dart: ^0.1.2" to clipboard
jsonrepair_dart: ^0.1.2 copied to clipboard

Repair invalid JSON documents by fixing common syntax issues.

Note: This repository includes a Dart port adapted from the original jsonrepair project: https://github.com/josdejong/jsonrepair. It is a port, not an original implementation authored here.

jsonrepair_dart #

Repair invalid JSON documents.

This package is a Dart port of the regular (non-streaming) API from the JavaScript jsonrepair library.

Install #

dart pub add jsonrepair_dart

Usage #

import 'package:jsonrepair_dart/jsonrepair_dart.dart';

void main() {
  final repaired = jsonrepair("{name: 'John'}");
  print(repaired); // {"name": "John"}
}

API #

  • jsonrepair(String input) -> String
  • throws JsonRepairError when repair is not possible
0
likes
140
points
26
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Repair invalid JSON documents by fixing common syntax issues.

License

ISC (license)

More

Packages that depend on jsonrepair_dart