Skip to content

JSON and newline delimited JSON (NDJSON) parser and streaming library for Dart

Notifications You must be signed in to change notification settings

Grizzly-dart/json_stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json_stream.dart

is a Dart library to parse JSON and NDJSON (newline delimited JSON).

Decode

void main() {
  print(decode('.5'));
  print(decode('.5e5'));
  print(decode('-.5e5'));
  print(decode('"hello"'));
  print(decode('["hello", 10]'));
  print(decode('{"hello": 10}'));
}

Encode

Future<void> main() async {
  print(encode("hello"));
  print(encode(5));
  print(encode(5.56));
  print(encode(null));
  print(encode(["hello", 5, null, 0.5]));
  print(encode({"key1": "value1", "key2": 5, "key3": null}));
}

About

JSON and newline delimited JSON (NDJSON) parser and streaming library for Dart

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages