Solved

Json Parse Error

Posted on 2016-09-15
4
50 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

We will take a look at the d3.js library for visualizations.  I will provide a walkthrough of a short bar graph example as well as introduce you to the d3.js API.  We also will explore links of other examples and further information regarding SVG's.
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)

839 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