141 return !this->operator == (ref);
174 ZFJson(
ZF_IN const ZFJson &ref);
175 virtual ~ZFJson(
void);
177 ZFJson &operator = (
ZF_IN const ZFJson &ref);
181 zfbool operator == (
ZF_IN const ZFJson &ref)
const;
182 inline zfbool operator != (
ZF_IN const ZFJson &ref)
const {
return !(this->operator == (ref));}
264 ,
ZF_IN const ZFJson &item
297 ,
ZF_IN const ZFJson &item
325 ZF_IN const ZFJson &item
359 _ZFP_ZFJsonPrivate *d;
362 ZFJson(
ZF_IN _ZFP_ZFJsonPrivate *ref);
global header for ZFAlgorithm module
#define ZFLIB_ZFAlgorithm
used to export symbols
Definition ZFAlgorithmDef.h:14
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define zfclassLikePOD
shows the class is not a POD type, but you may use it like a POD except memset it to 0
Definition ZFCoreTypeDef_ClassType.h:41
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
#define zfnullT
type for zfnull, can be used for function overload
Definition ZFCoreTypeDef_CoreType.h:85
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
#define zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
#define ZFOUTPUT_TYPE(T_Type, outputAction)
declare your custom type conversion to string, convenient for debug
Definition ZFCoreTypeDef_OtherType.h:221
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZFENUM_SEPARATOR()
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:158
#define ZFENUM_VALUE_REGISTER(Value)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:168
#define ZFENUM_REG(ZFLIB_, EnumName,...)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:186
#define ZFENUM_VALUE(Value)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:151
#define ZFENUM_BEGIN(ZFLIB_, EnumName)
macros to define reflectable enum type
Definition ZFEnumDeclare.h:147
#define ZFENUM_END(ZFLIB_, EnumName)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:172
#define ZFEXPORT_VAR_DECLARE(ZFLIB_, Type, Name)
util to export global variable
Definition ZFExport.h:68
ZFJsonOutputToken & ZFJsonOutputTokenTrim(void)
trim output token for ZFJsonToOutput
Definition ZFJson.h:151
ZFLIB_ZFAlgorithm ZFJson ZFJsonArray()
util to create ZFJson
ZFLIB_ZFAlgorithm void ZFJsonEscapeCharDecode(zfstring &dst, const zfchar *src, zfindex count=(((zfindex) -1)))
see ZFJsonEscapeCharEncode
ZFLIB_ZFAlgorithm ZFJson ZFJsonFromInput(const ZFInput &input, zfstring *errorHint=(zft_zfnull))
parse json, or return an item with null type if fail
ZFLIB_ZFAlgorithm zfbool ZFJsonToOutput(const ZFOutput &output, const ZFJson &item, const ZFJsonOutputToken &token=(ZFJsonOutputTokenDefault()))
convert json to output
zfstring ZFJsonToString(_ZFP_PropTypeW_ZFJson const &v, zfstring *errorHint=zft_zfnull)
util method to convert ZFJson to string
Definition ZFJson.h:364
ZFJsonOutputToken & ZFJsonOutputTokenDetail(void)
detailed output token for ZFJsonToOutput
Definition ZFJson.h:155
ZFLIB_ZFAlgorithm void ZFJsonEscapeCharEncode(zfstring &dst, const zfstring &src, zfindex count=(((zfindex) -1)))
encode json chars
v_ZFJsonType::ZFEnumType ZFJsonType
see v_ZFJsonType
Definition ZFJson.h:57
ZFLIB_ZFAlgorithm ZFJson ZFJsonObject()
util to create ZFJson
ZFJsonOutputToken & ZFJsonOutputTokenDefault(void)
default output token for ZFJsonToOutput
Definition ZFJson.h:159
ZFLIB_ZFAlgorithm zfbool ZFJsonToStringT(zfstring &s, _ZFP_PropTypeW_ZFJson const &v, zfstring *errorHint=zft_zfnull)
util method to convert ZFJson to string
#define ZFMP_IN_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:117
#define ZFMP_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:111
#define ZFMP_OUT_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:114
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_FUNC_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#define ZFMETHOD_FUNC_DECLARE_3(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:910
#define ZFMETHOD_FUNC_DECLARE_0(ZFLIB_, ReturnType, MethodName)
declare function type of ZFMethod
Definition ZFMethodFuncDeclare.h:493
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define ZFTYPEID_DECLARE(ZFLIB_, TypeName, Type)
register a type for reflection
Definition ZFTypeIdDeclare.h:137
#define ZFTYPEID_ACCESS_ONLY_REG(ZFLIB_, TypeName, Type,...)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:205
#define ZFTYPEID_ACCESS_ONLY_DECLARE(ZFLIB_, TypeName, Type)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:195
#define ZFTYPEID_REG(ZFLIB_, TypeName, Type,...)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:151
JSON item.
Definition ZFJson.h:167
ZFJson & attr(const zfstring &key, const zfstring &value)
set json item for key, valid only for v_ZFJsonType::e_Object
zfindex childCount(void) const
json child count, valid only for v_ZFJsonType::e_Array
ZFJson & attrRemove(const zfstring &key)
remove json item, valid only for v_ZFJsonType::e_Object
ZFJson childAt(zfindex index) const
get json child at index, valid only for v_ZFJsonType::e_Array
zfstring objectInfo(void) const
return object info
Definition ZFJson.h:190
zfbool valid(void) const
true if type is not v_ZFJsonType::e_Null
Definition ZFJson.h:212
ZFJson & attrRemoveAll(void)
remove all json item, valid only for v_ZFJsonType::e_Object
zfstring toString(const ZFJsonOutputToken &token=ZFJsonOutputTokenDefault()) const
return ZFJsonToString
ZFJson & merge(const ZFJson &other)
util to merge from other json
const zfstring & value(void) const
see value
ZFJson copy(void) const
return a copy of this node as well as all of its content
ZFJson & childRemoveAll(void)
remove all json child, valid only for v_ZFJsonType::e_Array
void objectInfoT(zfstring &ret) const
see objectInfo
zfiter attrIter(void) const
see zfiter
void attrIterRemove(zfiter &it)
see zfiter
ZFJson & childRemoveAt(zfindex index)
remove json child at index, valid only for v_ZFJsonType::e_Array
ZFJson attr(const zfstring &key) const
get json item for key, valid only for v_ZFJsonType::e_Object
ZFJson & child(const zfstring &value, zfindex index=((zfindex) -1))
add json child to specified index (ranged in [0, count]), valid only for v_ZFJsonType::e_Array
ZFJson & attr(const zfstring &key, const ZFJson &item)
set json item for key, valid only for v_ZFJsonType::e_Object
zfiter attrIterFind(const zfstring &key) const
see zfiter
zfindex objectRetainCount(void) const
get current retain count
ZFJson attrIterValue(const zfiter &it) const
see zfiter
zfindex attrCount(void) const
json item count, valid only for v_ZFJsonType::e_Object
void attrIterValue(zfiter &it, const ZFJson &item)
see zfiter
zfstring attrValue(const zfstring &key) const
util method to access json value, valid only for v_ZFJsonType::e_Object
ZFJson & value(const zfstring &value)
value of the node, valid only for v_ZFJsonType::e_Value type
zfstring attrIterKey(const zfiter &it) const
see zfiter
zfindex childFind(const ZFJson &item) const
find json child, valid only for v_ZFJsonType::e_Array
ZFJsonType type(void) const
type of this item
ZFJson & child(const ZFJson &item, zfindex index=((zfindex) -1))
add json child to specified index (ranged in [0, count]), valid only for v_ZFJsonType::e_Array
token for output json
Definition ZFJson.h:64
zfstring jsonArrayTagRight
"]" by default
Definition ZFJson.h:83
zfstring jsonValueTagRight
"\"" by default
Definition ZFJson.h:77
zfbool jsonObjectTagInSameLineIfNoContent
whether to put right tag in same line if no content, true by default
Definition ZFJson.h:98
zfstring jsonSeparatorInSameLineToken
", " by default
Definition ZFJson.h:71
zfbool jsonArrayAddNewLineForContent
whether add new line for content of a json array, true by default
Definition ZFJson.h:103
zfstring jsonSeparatorToken
"," by default
Definition ZFJson.h:70
zfstring jsonValueTagLeft
"\"" by default
Definition ZFJson.h:76
zfbool jsonObjectAddNewLineForContent
whether add new line for content of a json object, true by default
Definition ZFJson.h:94
zfstring jsonObjectTagRight
"}" by default
Definition ZFJson.h:80
zfstring jsonArrayTagLeft
"[" by default
Definition ZFJson.h:82
zfstring jsonNewLineToken
"\n" by default
Definition ZFJson.h:66
zfstring jsonKeyTagLeft
"\"" by default
Definition ZFJson.h:73
zfstring jsonValueSeparatorToken
" : " by default
Definition ZFJson.h:69
zfbool jsonArrayContentTagInSameLine
whether trim element tag in same line for a json array, valid only if jsonArrayAddNewLineForContent i...
Definition ZFJson.h:109
zfstring jsonIndentToken
" " by default
Definition ZFJson.h:67
zfstring jsonObjectTagLeft
"{" by default
Definition ZFJson.h:79
zfbool jsonArrayTagInSameLineIfNoContent
whether add new line for content of a json array, true by default
Definition ZFJson.h:113
zfstring jsonKeyTagRight
"\"" by default
Definition ZFJson.h:74
zfstring jsonGlobalLineBeginToken
strings added to head of each new line, empty by default
Definition ZFJson.h:89
general output callback
Definition ZFIOCallback_output.h:37
@ e_Null
Definition ZFJson.h:48
iterator for ZFFramework
Definition zfiter.h:40