streaming_json_parser 0.0.4 copy "streaming_json_parser: ^0.0.4" to clipboard
streaming_json_parser: ^0.0.4 copied to clipboard

A JSON parser that parses streaming or incomplete JSON

This dart package parses incomplete or "streaming" JSON which is useful for parsing JSON from a stream. For example when you want intermediate parsing results while waiting for the complete JSON to arrive.

It is not suitable for parsing large JSON documents as a stream since the parser starts from scratch whenever you call the parse method.

It is based on the code provided by https://github.com/eatonphil/pj and modified slightly to support parsing incomplete JSON.

Features #

  • Parses incomplete JSON

Getting started #

In the pubspec.yaml, add the following dependency:

dependencies:
  streaming_json_parser: ^0.0.3

In your library file add the following import:

import 'package:streaming_json_parser/streaming_json_parser.dart';

Usage #

import 'package:streaming_json_parser/streaming_json_parser.dart';

parse('{'); // returns {}
parse('{"key": "value", "someOtherIncomplet'); // returns {"key": "value"}
parse('{"key": ["value", "value2'); // returns {"key": ["value", "value2"]}
0
likes
110
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A JSON parser that parses streaming or incomplete JSON

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on streaming_json_parser