… | |
… | |
1603 | SvREFCNT_dec (self->cb_sk_object); |
1603 | SvREFCNT_dec (self->cb_sk_object); |
1604 | SvREFCNT_dec (self->cb_object); |
1604 | SvREFCNT_dec (self->cb_object); |
1605 | |
1605 | |
1606 | PROTOTYPES: ENABLE |
1606 | PROTOTYPES: ENABLE |
1607 | |
1607 | |
1608 | void to_json (SV *scalar) |
1608 | void encode_json (SV *scalar) |
1609 | PPCODE: |
1609 | PPCODE: |
1610 | { |
1610 | { |
1611 | JSON json = { F_DEFAULT | F_UTF8 }; |
1611 | JSON json = { F_DEFAULT | F_UTF8 }; |
1612 | XPUSHs (encode_json (scalar, &json)); |
1612 | XPUSHs (encode_json (scalar, &json)); |
1613 | } |
1613 | } |
1614 | |
1614 | |
1615 | void from_json (SV *jsonstr) |
1615 | void decode_json (SV *jsonstr) |
1616 | PPCODE: |
1616 | PPCODE: |
1617 | { |
1617 | { |
1618 | JSON json = { F_DEFAULT | F_UTF8 }; |
1618 | JSON json = { F_DEFAULT | F_UTF8 }; |
1619 | XPUSHs (decode_json (jsonstr, &json, 0)); |
1619 | XPUSHs (decode_json (jsonstr, &json, 0)); |
1620 | } |
1620 | } |