Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cJSON.h
Go to the documentation of this file.
1 //
5 
6 #ifndef _INC_cJSON_H
7 #define _INC_cJSON_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "../GrayLibBase.h"
15 
16 namespace GrayLib
17 {
19  class cVariant;
21 
23  {
28 
29  public:
30 
31  enum TYPE_TYPE
32  {
37  };
38 
39  static const char k_null[5];
40  static const char k_true[5];
41  static const char k_false[6];
42  static const int k_DEPTH_MAX = 50;
43 
44  static bool GRAYCALL IsJSON(const char* pszStr, StrLen_t iLenMax = StrT::k_LEN_MAX);
45  static cVariant GRAYCALL Parse(const char* pszVal);
46  static cJSONString GRAYCALL Encode(const cVariant& v);
47 
49  };
50 }
51 #endif
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cJSON.h:23
UNITTEST_FRIEND(cJSON)
TYPE_TYPE
Definition: cJSON.h:32
@ TYPE_Bool
Definition: cJSON.h:34
@ TYPE_Null
Definition: cJSON.h:33
@ TYPE_Double
Definition: cJSON.h:35
@ TYPE_String
Definition: cJSON.h:36
Definition: cVariant.h:26
Definition: cMesh.h:22
UNITTEST2_PREDEF(cQuadtree)
cStringA cJSONString
Definition: cJSON.h:19
int StrLen_t
the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters....
Definition: StrConst.h:32
static const StrLen_t k_LEN_MAX
arbitrary max size for Format() etc. NOTE: _MSC_VER says stack frame should be at least 16384
Definition: StrT.h:75