Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7087933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:44:06+00:00 2026-05-28T07:44:06+00:00

when i try to parse the response returned from a web service i got

  • 0

when i try to parse the response returned from a web service i got this stack:

JSONValue failed. Error trace is: (
    "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x6e76c30 {NSLocalizedDescription=Unrecognised leading character}"
)

My code is like this:

if(request.responseStatusCode==200)
    {   
        NSLog(@"so far, this block of code works");//this log is displayed
        //parse the response
        NSArray *array=[[request responseString]JSONValue];
               //processing the array and do whatever

In this thread they talking about an old version of the JSON library and how to update it, please help me figure out what should i do.

EDIT:

when trying to parse the response, i wanted to see why the server return, so an NSLog like so:

if(request.responseStatusCode==200)
        {   
               NSLog(@"the request is %@", request.responseString);
            //parse the response
            NSArray *array=[[request responseString]JSONValue];
                   //processing the array and do whatever

give me this stack:

the request is <br />
<b>Warning</b>:  implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in <b>/homepages/25/xxxx/htdocs/my app/webservices/index.php</b> on line <b>39</b><br />
<br />
<b>Fatal error</b>:  Call to undefined function sendResponse() in <b>/homepages/25/xxxxx/htdocs/my app/webservices/index.php</b> on line <b>57</b><br />
2012-01-20 15:10:45.491 my-iPhone-application[882:11603] -JSONValue failed. Error trace is: (
    "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x6ebd450 {NSLocalizedDescription=Unrecognised leading character}"
)

EDIT 2:

My application sent an array that is supposed to be received and processed in the web services. So one example of how the array received looks like is:

(
    Mairie,
    \"Pr\\U00e9fectures et sous-pr\\U00e9fectures\",
    \"Auto-\\U00e9cole\"
) 

The strange ant-slashes and 00 are the é caracter. Am i wrong to use them in my data? Is this which is causing my problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:44:07+00:00Added an answer on May 28, 2026 at 7:44 am

    The error pretty much says it all, the parser does not consider the JSON string is it reading to be valid JSON. “Unrecognised leading character” means that it found something other than a { or [ character as the first character in the string returned from [request responseString]

    If you post the raw JSON we might be able to help you point out exactly what is wrong with the response.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to parse a web service response using SAXParser and get certain values,
I'm trying to parse the xml document returned from this link but I get
Having received the following response from Foursquare, when I try to parse it, I
I try to parse RSS chaanal with simple-rss lib. Unfortunately I got a lot
I'm try to parse this xml, but c# keeps throwing an exception saying it
I try to get parse JSON response for the following link: https://graph.facebook.com/feed/?ids=135395949809348,149531474996&access_token= The response
I try to get user's emails, I got extemded permissions, this is my code:
Good day, This is more web service design than programming question I think. I'll
I have an Cocoa app that calls a web service. When I parse the
HttpWebRequest web; try { web = (HttpWebRequest)HttpWebRequest.Create(website.name); WebResponse Response = web.GetResponse(); Stream WebStream =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.