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 -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -