API reference
GDJSONLReader
Reader decoding JSON Lines one line at a time as chunks arrive.
Methods
feed
feed(chunk: String) -> Array, ErrAppend an input fragment to the incremental decoder.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
chunk | String | Required | Next input fragment, appended to previously buffered input. |
Return value
Array, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
finish
finish() -> Array, ErrCall when the input source ends.
Parameters
No parameters.
Return value
Array, Err
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.