json can not be analyzed on iOS and android side [on hold]

398
March 01, 2017, at 2:28 PM

We are using a Slim framework of PHP to develop backend and we also have iOS and android application. Now we meet a problem that iOS- and android- end can not analyze JSON data.

iOS used AF Networking to analyze JSON and compiler gave us the message:

Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}

JSON data got from android: {"stat":"1003","msg":"\u81ea\u52a8\u767b\u5f55\u4fe1\u606f\u5931\u6548\uff0c\u8bf7\u4f7f\u7528\u5bc6\u7801\u767b\u5f55","data":{"user_id":"","logo":"","name":"","token":"","balance":"","scores":""}}

But web-end could use JSON data normally.

Every time we've met the error we deleted all the PHP code and present the PHP code to the server, and the error no more existed. After some time we may meet the error again.

We've met this error many times, but couldn't resolve it. Thanks in advance.

Rent Charter Buses Company
READ ALSO
Get the fragment name or id

Get the fragment name or id

I am have a framelayout called one time in my Activity and various time in other Fragment (passing by the same framelayout of the Activity)

469
Unblocking Android device from GCM

Unblocking Android device from GCM

My company currently have an application with a number of Android devices attached via GCM

316
Android: How to check if a path contains touched point?

Android: How to check if a path contains touched point?

i would try to develop an application in which i can draw a planimetrySo, each room has got its own ID or name and, if i touch a room, i want to show a Toast Message with that ID or name

648