jsonstreamreader 0.0.7 copy "jsonstreamreader: ^0.0.7" to clipboard
jsonstreamreader: ^0.0.7 copied to clipboard

outdated

This project is processes a local json file by splitting it into smaller chunks, with automatic garbage collecting.Please use latest version.

example/main.dart

import 'dart:io';
import 'package:jsonstreamreader/jsonstreamreader.dart';
import 'package:path_provider/path_provider.dart';

void main() {
  Stopwatch stopwatch = new Stopwatch()..start();
  getApplicationDocumentsDirectory().then((Directory path) {
    File file = new File(path.path + '/mcfdcasesincaredemographics.json');
    Streamer s = new Streamer(file, chunksize: 1000);
    //now you can add delays between each chunck
    Reader r = new Reader(s, delay: 10);
    r.filter("\$.*", (dynamic value, String key) {
      print("value is ${value} and key is ${key}");
    }).done(() {
      print('executed in ${stopwatch.elapsed}');
    }).fail((err) {
      print(err);
    });
  }).catchError((error) {
    print(error);
  });
  //runApp(MyApp());
}
0
likes
35
pub points
0%
popularity

Publisher

unverified uploader

This project is processes a local json file by splitting it into smaller chunks, with automatic garbage collecting.Please use latest version.

Homepage

License

MIT (LICENSE)

Dependencies

flutter, heavylist, path_provider

More

Packages that depend on jsonstreamreader