Solved

Json Parse Error

Posted on 2016-09-15
4
58 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 52

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 34

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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)

726 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