This is a migrated thread and some comments may be shown as answers.

Underscore breaks JSON data

1 Answer 140 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 27 Dec 2011, 12:15 AM
I created a remote data source with underscores in the fields and the underscore character seems to be breaking the data source. Copied the data as a static JSON file and removed the underscore and it proved the issue.

Tips anyone on how to get Kendo to play nice with my data?

1 Answer, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 27 Dec 2011, 06:15 AM
OK. Figured this one out for anyone who follows after me. Here are some additional details.

  • If I sent back the data as test.json it worked. (note this was because the web server sent it back json encoded mime wise)
  • It would not work as a web service at first.
  • Changed the transport code as shown below which apparently makes it ignore the server declaration of mime type. (jsonp did not work in this case, had to try it for curiosity) Now things are working.
transport: {
read: {
url: "#ATTRIBUTES.ajaxService#",
dataType: "json"
}
}

Another day in code.
1. Code
2. Run code
3. Find bugs
4. Google and search past first ideas
5. Take break
6. Try again, and again
7. Find answer hiding in a box in the top of an empty closet in a deserted room, LOL
(translation to point 7, you wonder if this method of solving the mystery can ever be used again)

 Note to self: I am getting too old for this, but it is so awesome when you take the monsters down!
Tags
Data Source
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Share this question
or