- Home /
Recieving Null when I should not be with JSONParse.js
I'm using the JSONParse.js script from the unity wiki found here and I keep getting back Null for values that should be coming back as numbers like 4.4700000. I don't get back null for numbers like 14932.
Here is some code that I use.
var dataWWW: WWW = new WWW (dataFile);
yield dataWWW;
var newDataParsed = JSONParse.JSONParse(textStringData);
print(newDataParsed["data"][1][key4]);
//this print statement prints null when the number is
// something like 4.4700000 but it comes back as the a
//number if the number stored in the JSON file is somthing like 14932
What could I be doing wrong here and what can I do to fix it?
Comment
Would just switching to the JSONOBject Csharp library save me from more trouble? http://wiki.unity3d.com/index.php/JSONObject
I still need to parse through some text and then get a array that I can use in .js files.
Your answer
Follow this Question
Related Questions
About Json Datapath. 1 Answer
LitJson null bug 0 Answers
Why are my null JSON variables returning fully initialized? 2 Answers
TextAsset / Resources.load return null 4 Answers
gameobject null 1 Answer