… | |
… | |
12 | #define F_CANONICAL 0x00000008 |
12 | #define F_CANONICAL 0x00000008 |
13 | #define F_SPACE_BEFORE 0x00000010 |
13 | #define F_SPACE_BEFORE 0x00000010 |
14 | #define F_SPACE_AFTER 0x00000020 |
14 | #define F_SPACE_AFTER 0x00000020 |
15 | #define F_ALLOW_NONREF 0x00000080 |
15 | #define F_ALLOW_NONREF 0x00000080 |
16 | #define F_SHRINK 0x00000100 |
16 | #define F_SHRINK 0x00000100 |
|
|
17 | |
|
|
18 | // F_SKIPINVALID? |
|
|
19 | // F_EXECCODEREF? |
|
|
20 | // F_SELFCONVERT? |
17 | |
21 | |
18 | #define F_PRETTY F_INDENT | F_SPACE_BEFORE | F_SPACE_AFTER |
22 | #define F_PRETTY F_INDENT | F_SPACE_BEFORE | F_SPACE_AFTER |
19 | #define F_DEFAULT 0 |
23 | #define F_DEFAULT 0 |
20 | |
24 | |
21 | #define INIT_SIZE 32 // initial scalar size to be allocated |
25 | #define INIT_SIZE 32 // initial scalar size to be allocated |
… | |
… | |
1037 | XPUSHs (decode_json (jsonstr, *SvJSON (self))); |
1041 | XPUSHs (decode_json (jsonstr, *SvJSON (self))); |
1038 | |
1042 | |
1039 | PROTOTYPES: ENABLE |
1043 | PROTOTYPES: ENABLE |
1040 | |
1044 | |
1041 | void to_json (SV *scalar) |
1045 | void to_json (SV *scalar) |
|
|
1046 | ALIAS: |
|
|
1047 | objToJson = 0 |
1042 | PPCODE: |
1048 | PPCODE: |
1043 | XPUSHs (encode_json (scalar, F_UTF8)); |
1049 | XPUSHs (encode_json (scalar, F_UTF8)); |
1044 | |
1050 | |
1045 | void from_json (SV *jsonstr) |
1051 | void from_json (SV *jsonstr) |
|
|
1052 | ALIAS: |
|
|
1053 | jsonToObj = 0 |
1046 | PPCODE: |
1054 | PPCODE: |
1047 | XPUSHs (decode_json (jsonstr, F_UTF8)); |
1055 | XPUSHs (decode_json (jsonstr, F_UTF8)); |
1048 | |
1056 | |