objective c - Json Zero considered as NSNumber and greater as NSstring -


when value of json entry 0 xcode considers nsnumber, , when greater nsstring. problem when using if check value, app crashes in cases. check if json value 0, how should resolve this?

json:

(     {     likescount = 0; // nsnumber     } ) 

(     {     likescount = 1; // nsstring     } ) 

you can use integervalue property, exists on both nsnumber , nsstring.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -