simjson 1.2.1
Very simple JSON library for simstr
 
Loading...
Searching...
No Matches
simjson::StreamedJsonParser< K > Struct Template Reference

Parser for text in JsonValue. Allows you to parse JSON in chunks of text. For example, data comes in packets from the network, feed them to processChunk until we get the result. More...

#include <json.h>

Public Member Functions

JsonParseResult parseAll (ssType text)
 Parse all the text in one go.
 
JsonParseResult processChunk (ssType chunk, bool last)
 Parse a piece of text.
 

Detailed Description

template<typename K>
struct simjson::StreamedJsonParser< K >

Parser for text in JsonValue. Allows you to parse JSON in chunks of text. For example, data comes in packets from the network, feed them to processChunk until we get the result.

Template Parameters
K- character type.

Member Function Documentation

◆ parseAll()

template<typename K>
JsonParseResult simjson::StreamedJsonParser< K >::parseAll ( ssType text)
inline

Parse all the text in one go.

Parameters
text.
Returns
JsonParseResult.

◆ processChunk()

template<typename K>
JsonParseResult simjson::StreamedJsonParser< K >::processChunk ( ssType chunk,
bool last )
inline

Parse a piece of text.

Parameters
chunk- a portion of text.
last- a sign that this is the last portion of text. Depending on this, it can return Success or NoNeedMore.
Returns
JsonParseResult.

The documentation for this struct was generated from the following files: