26#ifndef THINGSML_SENML_JSON_STREAMING_PARSER
27#define THINGSML_SENML_JSON_STREAMING_PARSER
32#define STATE_START_DOCUMENT 0
34#define STATE_IN_ARRAY 1
35#define STATE_IN_OBJECT 2
36#define STATE_END_KEY 3
37#define STATE_AFTER_KEY 4
38#define STATE_IN_STRING 5
39#define STATE_START_ESCAPE 6
40#define STATE_UNICODE 7
41#define STATE_IN_NUMBER 8
42#define STATE_IN_TRUE 9
43#define STATE_IN_FALSE 10
44#define STATE_IN_NULL 11
45#define STATE_AFTER_VALUE 12
46#define STATE_UNICODE_SURROGATE 13
53#define BUFFER_MAX_LENGTH 512
76 char unicodeEscapeBuffer[10];
77 int unicodeEscapeBufferPos;
79 char unicodeBuffer[10];
84 int unicodeHighSurrogate;
86 void increaseBufferPointer();
92 void startValue(
char c);
96 void processEscapeCharacters(
char c);
100 bool isHexCharacter(
char c);
102 char convertCodepointToCharacter(
int num);
104 void endUnicodeCharacter(
int codepoint);
106 void startNumber(
char c);
122 int convertDecimalBufferToInt(
char myArray[],
int length);
126 void endUnicodeSurrogateInterstitial();
128 bool doesCharArrayContain(
char myArray[],
int length,
char c);
130 int getHexArrayAsDecimal(
char hexArray[],
int length);
132 void processUnicodeCharacter(
char c);
Definition: senml_jsonlistener.h:34
Definition: senml_jsonstreamingparser.h:58
JsonStreamingParser()
Definition: senml_jsonstreamingparser.cpp:32
void parse(char c)
Definition: senml_jsonstreamingparser.cpp:50
void reset()
Definition: senml_jsonstreamingparser.cpp:38
void setListener(JsonListener *listener)
Definition: senml_jsonstreamingparser.cpp:46
#define BUFFER_MAX_LENGTH
Definition: senml_jsonstreamingparser.h:53