quote:
Originally posted by Leroux
I'm a bit unclear as to how to do it on the msgpus side however.
Do I just download the page as a variable using XMLHTTP or is there another step in it, and then how do I eval() it?
Well, let's take the output from the php snipped posted by Matti
code:
{"foo":"bar","FoO":"cookie"}
Something like this should do the trick
JScript code:
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
var results = eval( '(' + xmlhttp.responseText + ')' );
Debug.Trace(results.foo);
Debug.Trace(results.FoO);
}
}
quote:
Originally posted by Leroux
I'm trying to test with http://arkanes-arkade.co.uk/x360/json.php?id=Sonic%20the%20hedgehog because I know sonic changes with the case. Everything I've read seems to want something such as JSON[0] to define the info. Would that make this gameid[0], where gameid is either SONIC THE HEDGEHOG or Sonic The Hedgehog?
Unfortunately that website doesn't seem to be loading here... just wondering what do you get as output so we can have a look.
Also, you might want try out this
online-JSON-editor and play around with JSON