--- JSON-XS/XS.xs 2008/03/19 15:37:54 1.75 +++ JSON-XS/XS.xs 2008/03/20 00:56:37 1.76 @@ -1644,16 +1644,22 @@ PROTOTYPES: ENABLE void encode_json (SV *scalar) + ALIAS: + to_json_ = 0 + encode_json = F_UTF8 PPCODE: { - JSON json = { F_DEFAULT | F_UTF8 }; + JSON json = { F_DEFAULT | ix }; XPUSHs (encode_json (scalar, &json)); } void decode_json (SV *jsonstr) + ALIAS: + from_json_ = 0 + decode_json = F_UTF8 PPCODE: { - JSON json = { F_DEFAULT | F_UTF8 }; + JSON json = { F_DEFAULT | ix }; XPUSHs (decode_json (jsonstr, &json, 0)); }