C++ TargetRTS
Loading...
Searching...
No Matches
RTJsonParser.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2024. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTJsonParser_h__
11#define __RTJsonParser_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#include <RTJsonParserUtils.h>
18#include <RTJsonResult.h>
19
23{
24 RTJsonParserUtils parserUtils;
25 int parseString( std::string & str, const char * jsonString );
26 int parseNumber( std::string & num, const char * jsonString );
27 RTJsonToken getFieldName( std::string &, const char * , size_t & );
28
29 bool parseArray( RTJsonResult & result, const std::string & jsonString, size_t & pos );
30
31 bool parseObject( RTJsonResult & result, const std::string & jsonString, size_t & pos );
32
33 bool parseField( RTJsonResult & result, const std::string & jsonString, size_t & pos );
34
35public:
36 explicit RTJsonParser();
37 ~RTJsonParser(void);
38
57 bool parseJsonString( RTJsonResult & result, const std::string & jsonStr );
58};
59
60#endif // __RTJsonParser_h__
Utility for parsing JSON.
Definition: RTJsonParser.h:23
bool parseJsonString(RTJsonResult &result, const std::string &jsonStr)
Parse a JSON string.
Definition: RTJsonParserUtils.h:47
Represents the result of parsing a JSON string.
Definition: RTJsonResult.h:29