SimpleJSON err for cloud script exec:
Sorry hard to see -- I'll dig through logs soon and find a clearer version to replace, if need.
Just seeing if you know a general answer before I post details, I'm just running out the door and will come back to edit with more details.
EDIT: I pass an object "EndInfo" that contains the following:
// public string name; // public string username; // public string startClass; // public Classes.Faction startFaction; // public string finalClass; // public Classes.Faction finalFaction; // public bool won;
essentially a string, string, enum (string), string, enum (string), and bool.
EDIT 2: Works fine with postman. Now I really am wondering if I need to make a separate object just to ToString() those enums. I figured SimpleJSON would do that. This is still my latest theory.
EDIT 3: I tried some mock values within Unity - and seemed to oddly work fine:
// Works EndInfo.playerInfo mockPlayerInfo = new EndInfo.playerInfo(); mockPlayerInfo.name = "Test Name"; mockPlayerInfo.username = "TestUsername"; mockPlayerInfo.startClass = "Observer"; mockPlayerInfo.startFaction = Classes.Faction.BlueDragon; mockPlayerInfo.finalClass = "Nightwatch"; mockPlayerInfo.finalFaction = Classes.Faction.BlackRose; mockPlayerInfo.won = true;
I realized I didn't do any null checks. However, a null value shouldn't effect a SimpleJSON parse, should it? if name = null, for example. It should just do "name": ""