isolate_json 2.0.0-nullsafety.1 copy "isolate_json: ^2.0.0-nullsafety.1" to clipboard
isolate_json: ^2.0.0-nullsafety.1 copied to clipboard

outdated

Library for using a long-lived isolate for JSON encoding and decoding.

Introduction #

This is a library for using a long-lived isolate to encode and decode JSONs.

When in a VM it uses isolates. This package is able to support web by falling back to encoding/decoding without isolates on web. This is so that an application using this package does not have to do that check itself.

Usage #

A simple usage example:

import 'package:isolate_json/isolate_json.dart';

Future<void> main() async {
  String json;
  final output1 = await JsonIsolate().decodeJson(json);

  final output2 = await JsonIsolate().encodeJson({
    'jsonData': true,
  });

  final output3 = await JsonIsolate().encodeJson([1, 2, 3]);

  print(output1);
  print(output2);
  print(output3);
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

11
likes
0
pub points
70%
popularity

Publisher

unverified uploader

Library for using a long-lived isolate for JSON encoding and decoding.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on isolate_json