json_events
library
Functions
readArrayJson <T > ({required StreamIterator <JsonEvent > si , FutureOr <T > creator ()?, bool callLoader = true })
→ Stream <T >
Reads the current value as an array from the iterator
It is almost same with the readArrayJsonContinue .
The difference is that this function assumes the iterator
has not moved yet. So it calls StreamIterator.moveNext
then calls readArrayJsonContinue
readArrayJsonContinue <T > ({required StreamIterator <JsonEvent > si , FutureOr <T > creator ()?, bool callLoader = true })
→ Stream <T >
Reads the current value as an array from the iterator
readCustomObjectJson ({required StreamIterator <JsonEvent > si , required FutureOr <void > readJson (String key ), FutureOr <void > postProcessJson ()? })
→ Future <void >
It is almost same with the readCustomObjectJsonContinue .
The difference is that this function assumes the iterator
has not moved yet. So it calls StreamIterator.moveNext
then calls readCustomObjectJsonContinue
You can use this function for parsing objects that
you do not know the type before parsing. For example,
polymorphism based on field or $type fields
readCustomObjectJsonContinue ({required StreamIterator <JsonEvent > si , required FutureOr <void > readJson (String key ), FutureOr <void > postProcessJson ()? })
→ Future <void >
Reads the current value as an object from the iterator
readNestedArrayJson <T extends List , E > ({required StreamIterator <JsonEvent > si , FutureOr <E > creator ()?, bool callLoader = true })
→ Stream <T >
It is almost same with the readNestedArrayJsonContinue .
The difference is that this function assumes the iterator
has not moved yet. So it calls StreamIterator.moveNext
then calls readNestedArrayJsonContinue
readNestedArrayJsonContinue <T extends List , E > ({required StreamIterator <JsonEvent > si , FutureOr <E > creator ()?, bool callLoader = true })
→ Stream <T >
Reads the current value as a nested array from the iterator
readObjectJson <T extends JsonObjectTraverser > ({required StreamIterator <JsonEvent > si , required FutureOr <T > creator () })
→ Future <T >
It is almost same with the readObjectJsonContinue .
The difference is that this function assumes the iterator
has not moved yet. So it calls StreamIterator.moveNext
then calls readObjectJsonContinue
readObjectJsonContinue <T extends JsonObjectTraverser > ({required StreamIterator <JsonEvent > si , required FutureOr <T > creator () })
→ Future <T >
Reads the current value as an object from the iterator
readPropertyJson <T > ({required StreamIterator <JsonEvent > si , T? defaultValue })
→ Future <T >
It is almost same with the readPropertyJsonContinue .
The difference is that this function assumes the iterator
has not moved yet. So it calls StreamIterator.moveNext
then calls readPropertyJsonContinue
readPropertyJsonContinue <T > ({required StreamIterator <JsonEvent > si , T? defaultValue })
→ Future <T >
Reads the current value as a json value from the iterator