readNextBlock method

  1. @override
JSONBlockReader? readNextBlock(
  1. Map<String, int> blockTypes
)
override

Implementation

@override
JSONBlockReader? readNextBlock(Map<String, int> blockTypes) {
  if (isEOF()) {
    return null;
  }

  var obj = <dynamic, dynamic>{};
  obj['container'] = _peek();
  var type = readBlockType(blockTypes);
  dynamic c = context.first;
  if (c is Map) {
    c.remove(nextKey);
  } else if (c is List) {
    c.removeAt(0);
  }

  return JSONBlockReader.fromObject(type, obj);
}