Solved

Json Parse Error

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

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 32

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
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…
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)

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now