Skip to content
pubscout

yet_another_json_isolate

2.1.1, released 5 months ago by supabase.io

Parse and encode JSON in a dedicated isolate to avoid blocking the main thread.

WASM-readyRepository archived
$ flutter pub add yet_another_json_isolate
Source repository

What it does

The package runs a persistent isolate that can encode Dart objects to JSON strings and decode JSON strings back to Dart objects. It provides simple methods to initialize, use, and dispose the isolate.

AI-written summary of version 2.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need heavy JSON processing that could freeze the UI
  • You want to offload JSON work without managing isolates yourself

Skip it when

  • JSON payloads are tiny and performance impact is negligible
  • You already use a code‑gen solution like json_serializable

Strengths

  • Keeps the main isolate responsive
  • Simple API – just initialize, encode/decode, dispose

Weaknesses

  • Adds an extra isolate overhead even for small tasks
  • No code‑generation integration; you must handle model serialization yourself

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
final isolate = YAJsonIsolate()..initialize();
final json = await isolate.encode(myObject);
final obj = await isolate.decode(jsonString);
isolate.dispose();

Alternatives

Packages that do the same job and could replace yet_another_json_isolate.

Works with

Packages commonly used together with yet_another_json_isolate: ones it builds on, ones built on it, and its own family.