You need to use a C2 format.
{"c2dictionary":true,"data":{"score":"5","high_score":"315","game_token":"xyzabc"}}
Load this JSON to dictionary, and you will be able to read any data very easily: "myDictionay.Get("score")", etc.
Your rails server should take care of that output format, this will make your life easier. For example my PHP server C2 core API contains following functions:
protected function outputAsC2DictionaryJSON($data)
{
$data = array(
'c2dictionary' => true,
'data' => $data
);
$this->outputData($data);
}
protected function outputAsC2ArrayJSON($data, $arrayDimensions)
{
$data = array(
'c2array' => true,
'size' => $arrayDimensions,
'data' => $data
);
$this->outputData($data);
}
private function outputData($data)
{
header('Content-Type: application/json');
echo json_encode($data);
exit(1);
}[/code:1jdk7h4w]