So I’ve got JSON files which hold my game’s level data (various puzzles for a puzzle game). I at first planned to develop solely for iOS, but decided to also support HTML5 mostly to demo the game easier. I say this, to note that the JSON files themselves are totally valid and worked at first w/ iOS and File.ReadAllText
.
To make this transition, I had to stop using File.ReadAllText
to load files and use Unity’s WWW
library instead. For one file, deserialization via JsonUtility.FromJson<T>(www.text)
worked just fine, but the next file didn’t take, without a specific error. This file is quite large (156 kb) and has escaped quotes within quotes to reference JSON structures within strings within my overall JSON structure. e.g., a Puzzle looks like such: { "rows": 2 "cols": 1, ... "solvedPuzzleJSON": "{ \"internalJsonKey\": \"value\" }" }
Is there some type of text formatting that occurs on File.ReadAllText
that doesn’t automatically happen with the WWW#text
property?