ZFFramework
 
Loading...
Searching...
No Matches
ZFJsonSerializableConverter.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFJsonSerializableConverter_h_
7#define _ZFI_ZFJsonSerializableConverter_h_
8
9#include "ZFJson.h"
11
12// ============================================================
17 , ZFMP_OUT(ZFSerializableData &, serializableData)
18 , ZFMP_IN(const ZFJson &, jsonObject)
19 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
20 , ZFMP_OUT_OPT(ZFJson *, outErrorPos, zfnull)
21 )
26 , ZFMP_IN(const ZFJson &, jsonObject)
27 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
28 , ZFMP_OUT_OPT(ZFJson *, outErrorPos, zfnull)
29 )
34 , ZFMP_OUT(ZFJson &, jsonObject)
35 , ZFMP_IN(const ZFSerializableData &, serializableData)
36 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
37 , ZFMP_OUT_OPT(ZFSerializableData *, outErrorPos, zfnull)
38 )
43 , ZFMP_IN(const ZFSerializableData &, serializableData)
44 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
45 , ZFMP_OUT_OPT(ZFSerializableData *, outErrorPos, zfnull)
46 )
47
48// ============================================================
54 , ZFMP_IN(const ZFInput &, input)
55 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
56 )
59 , ZFMP_IN(const ZFInput &, input)
60 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
61 )
66 , ZFMP_IN(const ZFOutput &, outputCallback)
67 , ZFMP_IN(const ZFSerializableData &, serializableData)
68 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
70 )
71
72// ============================================================
77 , ZFMP_OUT(zfauto &, ret)
78 , ZFMP_IN(const ZFInput &, input)
79 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
80 )
83 , ZFMP_IN(const ZFInput &, input)
84 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
85 )
90 , ZFMP_IN(const ZFOutput &, outputCallback)
91 , ZFMP_IN(ZFObject *, obj)
92 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
94 )
95
97#endif // #ifndef _ZFI_ZFJsonSerializableConverter_h_
98
#define ZFLIB_ZFAlgorithm
used to export symbols
Definition ZFAlgorithmDef.h:14
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
JSON processing.
ZFJsonOutputToken & ZFJsonOutputTokenDefault(void)
default output token for ZFJsonToOutput
Definition ZFJson.h:159
ZFLIB_ZFAlgorithm zfbool ZFSerializableDataToJson(ZFJson &jsonObject, const ZFSerializableData &serializableData, zfstring *outErrorHint=(zft_zfnull), ZFSerializableData *outErrorPos=(zft_zfnull))
print serializable to json formated data
ZFLIB_ZFAlgorithm zfbool ZFObjectFromJson(zfauto &ret, const ZFInput &input, zfstring *outErrorHint=(zft_zfnull))
util method to parse object from input with json format
ZFLIB_ZFAlgorithm zfbool ZFObjectToJson(const ZFOutput &outputCallback, ZFObject *obj, zfstring *outErrorHint=(zft_zfnull), const ZFJsonOutputToken &token=(ZFJsonOutputTokenDefault()))
util method to convert serializable object to json format
ZFLIB_ZFAlgorithm zfbool ZFSerializableDataFromJson(ZFSerializableData &serializableData, const ZFJson &jsonObject, zfstring *outErrorHint=(zft_zfnull), ZFJson *outErrorPos=(zft_zfnull))
parse json formated data to serializable
#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_4(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:1065
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
general input callback
Definition ZFIOCallback_input.h:37
JSON item.
Definition ZFJson.h:167
token for output json
Definition ZFJson.h:64
base class of all objects
Definition ZFObjectCore.h:209
general output callback
Definition ZFIOCallback_output.h:37
ZFSerializable's data container, see ZFSerializable.
Definition ZFSerializableData.h:74
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34