Once I had to parse files in JSON format in Origin C. Following shows how I did it (not sure if it'll work in 64-bit Origin, mine is 32-bit XP):
void jsonreader()
{
Object js;
js = CreateObject("MSScriptControl.ScriptControl");
js.Language = "JavaScript";
// {"success":"1","values":[1,2,3,4,5]}
string json = "{\"success\":\"1\",\"values\":[1,2,3,4,5]}";
string strVar;
strVar.Format("var json = %s;", json);
js.AddCode(strVar);
js.AddCode("function getValues(){return json.values;}");
string s = js.Run("getValues");
printf("%s\n", s); // 1,2,3,4,5
return;
}
According to https://originlab.jira.com/wiki/display/OB/B3+-+Origin+2015+Python+Support , you can do this instead:
>>> import json
>>> js = {"success":"1","values":[1,2,3,4,5]}
>>> js['values']
[1, 2, 3, 4, 5]
妾+ 午旦 妹罕妾 妾伊 用仇 妾/ 岫ㄞ
妾京用 仍巨 件 侈 件戶' 甘岫平 /欠 白岫妹
併 艮 岫 奈 白 岫
岫