"Read .JSON file" methods in unity C# that also work with IOS and Android platforms -


i'm new unity , stuck reading .json file previous few days. there lot of threads , methods explain every time tried of them , worked perfect on unity editor in ios , android devices don't load data. tried

1 - simplejson here

2 - tried use .plist file save data(which in form of dictionary) , convert extension .txt .plist not work on ios , used plist parser given on link

to read plist again worked unity editor not android , ios devices.

now while i'm searching around , there number of methods litjson fxjson etc. before trying them , want ask if know method work ios , android devices. can list ways read json file work ios , android... thank you.

addition : on xcode it's giving me following error , not load .json file.

enter image description here

code i've used read file following :

string jsn; using (streamreader r = new streamreader("assets/resources/foodstore.json"))  {     jsn = r.readtoend (); }  jsondata jsonbooks = jsonmapper.toobject(jsn); 

the assets folder doesn't exist in build. want use resources.load function instead.

try code below

string jsn = resources.load<textasset>("foodstore").text;   jsondata jsonbooks = jsonmapper.toobject(jsn); 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -