Robotis Openmanipulatorx icon Robotis Openmanipulatorx Inverse kinematics for Robotis OpenManipulatorX: compute joint angles and MoveTo 3D (cm) positions, supports camera-to-CM mapping for pick-and-place. Try it →
 

Parse JSON

The JSON javascript class is included in the ARC javascript compiler. You can parse the JSON in javascript directly in ARC.


Here's an example parsing JSON from a string...

Code:


var resp = '{ "glossary": { "title": "example glossary" } }';

var myObj = JSON.parse(resp);

print (myObj.glossary.title);



And here's an example of getting JSON from an HTTP get request...

Code:


var resp = Net.hTTPGet("https://ip.jsontest.com/");

var myObj = JSON.parse(resp);

print (myObj.ip);