This is probably a newbie mistake ’cause I can’t find any documentation on it, so bear with me.
I’m passing a JSON object from flash AS3 to PHP, which is then taken apart and passed to the DB.
In Flash: var jsonObject:Object = JSON.encode(currentlySelectedArray); In PHP: $json_pieces_array = $_POST['jsonArray']; $json_obj = json_decode($json_pieces_array, true);
When I test my code by copy/pasting the output of ‘trace (saveDataJSON.ToString());’ and putting it into my ‘$_POST['jsonArray'] = ‘[[Valid JSONLint checked JSON here.]]’, everything works fine and it gets pushed to the database.
But when I don’t meddle and use the flash-sent $_POST, nothing pushes to the MYSQL DB.
My question is twofold:
1) What’s the best way to bug test this sort of complication? I’m in the Flash interface.
2) What sorts of things should I be looking for? I already checked that the JSON being encoded was valid. Is there some sort of weird typecasting I’m missing?