Package DE_EPAGES::TLE::API::JSONHandler
This handler supports the following tle function:
- FROM_JSON - transforms json into hash.
- TO_JSON - transforms hash into json.
- JSON_ATTR - transforms hash into a data-attribute.
Example |
#FROM_JSON(#json) #FROM_JSON(#hash) |
Functions
FROM_JSON
Returns the hash object from json object.
Syntax |
#FROM_JSON(#json); |
Example |
#FROM_JSON(#json) |
Input |
|
Return |
|
JSON_ATTR
Returns the json object from a hash or array reference. Also encodes the XML chacters &', so that the reuslt can be used within a single-quote delimited XML attribute.
Syntax |
#JSON_ATTR(#Hash); |
Example |
<div id="mydata" data_js='#JSON_ATTR(#Hash)' /> |
Input |
|
Return |
|
TO_JSON
Returns the json object from a hash or array reference.
Syntax |
#TO_JSON(#Hash); |
Example |
#TO_JSON(#Hash) |
Input |
|
Return |
|