ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/XS.xs
(Generate patch)

Comparing JSON-XS/XS.xs (file contents):
Revision 1.14 by root, Sat Mar 24 22:55:43 2007 UTC vs.
Revision 1.16 by root, Sun Mar 25 02:37:00 2007 UTC

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
1039PROTOTYPES: ENABLE 1043PROTOTYPES: ENABLE
1040 1044
1041void to_json (SV *scalar) 1045void 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
1045void from_json (SV *jsonstr) 1051void 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines