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 8310945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:38:40+00:00 2026-06-08T19:38:40+00:00

I got the JSON result as -JSONValue failed. Error is: Unexpected end of input

  • 0

I got the JSON result as -JSONValue failed. Error is: Unexpected end of input. Please direct me in right way.

I am new in parsing . I have to get Data from the server by POST method. I have following details. I have to pass zip with url

{"zip":"52435","methodIdentifier":"search_dealer"}

url : http://usaautoleads.com/api.php

method: post

web service name: search_dealer

response : {"success":"0","dealer":[info...]}

my code is here.

NSURL *myURL=[NSURL URLWithString:@"http://usaautoleads.com/api.php"];

NSString *post =[[NSString alloc]initWithString:@"52435"];

NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];

NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];

[request setURL:myURL]; 

[request setHTTPMethod:@"POST"];

[request setHTTPBody:postData]; 

[request setValue:@"application/json" forHTTPHeaderField:@"content-type"];

[[NSURLConnection alloc] initWithRequest:request delegate:self];
  • 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-06-08T19:38:43+00:00Added an answer on June 8, 2026 at 7:38 pm

    The problem here is with your post string. Use this one

    NSString *zip = @"52435";
    NSString *methodID = @"search_dealer";
    NSString *post =[NSString stringWithFormat:@"{\"zip\":\"%@\",\"methodIdentifier\":\"%@\"}", zip, methodID];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've got an integration test that grabs some json result from a 3rd party
I got below JSON string, i facing issue parsing because it contains non english
I have a list of places in listview which i got from parsing JSON.
I have some problem with JSON parsing. When I hit URL, I've got JSON
here's my jQuery to parse Json result I got back from one of my
I have got this result using json decode from an api call. but I
My Silverlight application ViewModel has many Json parsing dependencies on to System.Json.dll. I got
I want to get json result using Jquery. Now I always got 'undefined' result.
I have queried yahoo finance for historic data and have got JSon output. What
I got the JSON from apple like this { original-purchase-date-pst = 2012-06-28 02:46:02 America/Los_Angeles;

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.