<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><style type="text/css">.felamimail-body-blockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px solid #000088;} </style></head><body>Am 18.07.2012 15:14:19, schrieb Leo Bicknell:<br><blockquote class="felamimail-body-blockquote"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><style type="text/css">.felamimail-body-blockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px solid #000088;} </style>I've had to deal with JSON before, but it was long ago and far away.<br>I suspect it is not something most sysadmin/netadmin types deal with on<br>a daily basis. It's not hard, just not familar.<br><br>To that end, if RIPE could produce a template/example in a few popular<br>languages (perl, python, ruby, php) to download the JSON and parse into<br>the native language data structure that could get a LOT more folks using<br>the data...<br></blockquote><br>Javascript:<br>At https://www.bartschnet.de/lib/js/XMLHttpRequest.js you can find my Javascript-function which I use to directly communicate with a JSON-API via POST from a browser.<br><br>url: API-URL<br>object: Javascript-object to be converted to JSON and sent to API ( can be "{}") if you don't want to send any data<br>callback: Javascript-function which gets a javascript-object converted from JSON-POST-result as only parameter<br><br><br>PHP:<br><br>You can directly decode JSON to PHP-objects/arrays with:<br><br>http://php.net/manual/en/function.json-decode.php<br><br>or encode any PHP data type including objects and arrays to JSON with:<br>http://php.net/manual/en/function.json-encode.php<br><br>Just do not forget JSON-strings are UTF-8!<br><br>Best regards,<br><br>Renne<br><br><span id="felamimail-body-signature">--<br>Sent with love from the new tine 2.0 email client ...<br>Please visit <a href="http://tine20.org">http://tine20.org</a></span></body></html>