0

I am developing a mobile app with the AppMobi tools and xdk. If I make a call to (accepts POST only) http://mg.smartmax.com/sightmaxwebservices/sightmaxwebservice.svc/jsoperator/TestjqMobi

The returned json fails parsing on iOS only (android works fine). This same call works fine in mobile safari, but it seems when its called from the app, it takes a different path and errors. This seems to be a known issue and was wondering if anyone had a good workaround?

Mike_G
  • 16,237
  • 14
  • 70
  • 101

3 Answers3

0

I work at appMobi - this appears to be a bug with the native container in iOS. Have you tried building your app and testing (app*lab doesn't have the latest code base).

  • No, ive only used the app*lab to test. Is this something that you think has been fixed with them? – Mike_G Feb 06 '13 at 16:17
  • Could be - like I said we make fixes to the containers alot in between app*lab updates. –  Feb 06 '13 at 18:48
0

What are you using to parse the JSON? Something like

var obj = JSON.parse(data);

As a workaround for now I suppose you could just include and use another parser.

JustTrying
  • 764
  • 6
  • 11
0

Make sure that your server is properly encoding the JSON.

I ran into this exact same issue. If you are using Drupal as your backend, use their function drupal_json_encode instead of PHP's json_encode. The information I was passing to the app was generated by a WYSYWIG editor, and perhaps that is what drupal's json encoding function takes into account that php's json encoding doesn't.

Tony Nardi
  • 413
  • 2
  • 7