p6jsontypes.h

Go to the documentation of this file.
00001 
00011 #ifndef P6JSONTYPES_H__
00012 #define P6JSONTYPES_H__ 1
00013 
00014 #include "p6err.h"
00015 
00016 namespace P6R { 
00017 
00018 #ifdef  __cplusplus
00019 extern "C" {
00020 #endif
00021 
00032 typedef struct 
00033 {
00034    const P6CHAR* pStart; 
00035    P6UINT32      length;
00036 } P6JSONSTRING;
00037 
00038 
00045 typedef enum {
00046   P6JSON_TYPE_NULL    = 0x00,      // -> 'null' JSON value type
00047   P6JSON_TYPE_STR     = 0x01,      // -> entire JSON string returned in once piece
00048   P6JSON_TYPE_STRPART = 0x02,      // -> part of a JSON string, entire string coming in chunks
00049   P6JSON_TYPE_STREND  = 0x03,      // -> end of string which was returned in several chunks
00050   P6JSON_TYPE_BOOL    = 0x04,      // -> 'true' | 'false' json values
00051   P6JSON_TYPE_INTEGER = 0x05,      // -> both positive and negative 32 bit numbers
00052   P6JSON_TYPE_REAL    = 0x06       // -> any number with a decimal point in it
00053 } P6JSON_TYPE;
00054 
00055 
00072 typedef struct 
00073 {
00074    P6JSON_TYPE  type;         // which type is used?
00075    P6JSONSTRING jstring;      // offset into buffer where string was found
00076    P6INT32      integer;      // P6JSON_TYPE_INTEGER
00077    P6FLOAT      real;         // P6JSON_TYPE_REAL
00078    P6BOOL       boolean;      // P6JSON_TYPE_BOOL
00079 } P6JSONVALUE;
00080 
00081 #ifdef  __cplusplus
00082 }
00083 #endif
00084 
00085 } // namespace
00086 
00087 
00088 #endif
00089 
00090 
00091 
00092 
00093 
00094 
00095 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.