Solved

Json Parse Error

Posted on 2016-09-15
4
46 Views
Last Modified: 2016-09-20
Hi

i got a json request . but when i try to parse throws error as
JSON.parse: unexpected character at line 1 column 2 of the JSON data
. Here is my json

[
  {
    "FullImage": "http://localhost:57226/img/image1.JPG",
    "imageThumb": "http://localhost:57226/img/image1.JPG",
    "description": "http://localhost:57226/img/image1.JPG",
    "Address": "Test",
    "imageid": "1",
    "TextColor": "White"
  },
  {
    "FullImage": "http://localhost:57226/img/image1.JPG",
    "imageThumb": "http://localhost:57226/img/image1.JPG",
    "description": "http://localhost:57226/img/image1.JPG",
    "Address": "Test",
    "imageid": "1",
    "TextColor": "White"
  }
]

Open in new window

0
Comment
Question by:karthik80c
  • 2
4 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 41799324
looks a valid json object, you can validate it at:

https://jsonformatter.curiousconcept.com/
http://jsonlint.com/

how your jQuery calling the json object?
0
 
LVL 33

Assisted Solution

by:ste5an
ste5an earned 500 total points
ID: 41799344
Same problem as yesterday: It's your JSON handling. Which you don't have us told anything about.

Post a concise and complete example.
0
 

Accepted Solution

by:
karthik80c earned 0 total points
ID: 41799497
Sorry Stean . Actually am using

  $.ajax({
       
        url: "Imagehandler.ashx?propertyid=" + propertyid
       
    }).done(function (rsp) {

        var propertyData = rsp;

ajax function by default it will parse json. This will help someone . Thanks Experts
0
 

Author Closing Comment

by:karthik80c
ID: 41806214
I got the Output
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question