… | |
… | |
1642 | SvREFCNT_dec (self->cb_object); |
1642 | SvREFCNT_dec (self->cb_object); |
1643 | |
1643 | |
1644 | PROTOTYPES: ENABLE |
1644 | PROTOTYPES: ENABLE |
1645 | |
1645 | |
1646 | void encode_json (SV *scalar) |
1646 | void encode_json (SV *scalar) |
|
|
1647 | ALIAS: |
|
|
1648 | to_json_ = 0 |
|
|
1649 | encode_json = F_UTF8 |
1647 | PPCODE: |
1650 | PPCODE: |
1648 | { |
1651 | { |
1649 | JSON json = { F_DEFAULT | F_UTF8 }; |
1652 | JSON json = { F_DEFAULT | ix }; |
1650 | XPUSHs (encode_json (scalar, &json)); |
1653 | XPUSHs (encode_json (scalar, &json)); |
1651 | } |
1654 | } |
1652 | |
1655 | |
1653 | void decode_json (SV *jsonstr) |
1656 | void decode_json (SV *jsonstr) |
|
|
1657 | ALIAS: |
|
|
1658 | from_json_ = 0 |
|
|
1659 | decode_json = F_UTF8 |
1654 | PPCODE: |
1660 | PPCODE: |
1655 | { |
1661 | { |
1656 | JSON json = { F_DEFAULT | F_UTF8 }; |
1662 | JSON json = { F_DEFAULT | ix }; |
1657 | XPUSHs (decode_json (jsonstr, &json, 0)); |
1663 | XPUSHs (decode_json (jsonstr, &json, 0)); |
1658 | } |
1664 | } |
1659 | |
1665 | |