How to parse JSON with single quotes with JSONModel?

839 views Asked by At

Is there any way to parse JSON with single quotes like

{'lat': 0, 'lng': 0} 

with JSONModel?

2

There are 2 answers

0
mixel On BEST ANSWER

Ended up with @CouchDeveloper advice.

3
thorb65 On

you could replace the wrong chars:

NSString *json = [yourJSONString stringByReplacingOccurrencesOfString:@"'" withString:@"\""];

and then you can handle it as corretc JSON :-)