In the code below, I tried iterating over the JSON object string. However, I do not get the desired output. My output on the webpage looks something like:-
+item.temperature++item.temperature++item.temperature++item.temperature+
The alert that outputs the temperature works well. The part where I try accessing the value by iterating thr...
how would I return a list of string in a json result in C# asp.net MVC?
I have this controller
public JsonResult AutoCompletePart(string id)
{
AutoCompleteService srv = new AutoCompleteService();
string[] parts = srv.AutoCompleteItemMaster(id);
//how do i return parts as JSON?
}
Thanks
...
I'm using the jQuery.sheet extension found at: http://www.visop-dev.com/jquerysheet.html
Anyone have any experience with this plug in? Im trying to import a json file on page load. Following the demo I formatted my json output, but how do I load the output? I have my load function to:
$('#sheet').sheet({
buildSheet: jQuery.sheet.m...
We're trying to use Jackson 1.5 to take advantage of some of the polymorphic handling it offers, but it appears that Jersey brings along it's own outdated version of Jackson (1.1.1). When testing Jersey serialized JSON, we get different results than when we serialize by hand in unit tests.
{"id":"40","ticketProps":[{"id":"28","field":{...
I'm trying to use the Yelp API to get local restaurants depending on the user's latitude and longitude. The trouble is that I'm quite sure how to do this. Looking at the page that I need to retrieve the data from, it says that the type is text/plain. Can I use Ajax to do this or will I not be able to since it is a different domain?
E...
I'm using javascript with a json library and running into a little trouble. Here's my json output:
{
"artist": {
"username": "myname",
"password": "password",
"portfolioName": "My Portfolio",
"birthday": "2010-07-12 17:24:36.104 EDT",
"firstName": "John",
"lastName": "Smith",
...
I'm trying to deserialize/serialize a timespan,
but when the json is send it's set to 00:00:00
is this even possible to do?
Thanks!
-Kevin
Btw, Language is C#, using Visual Studio 2008.
...
Guys,
I'm trying to hookup a ASMX web services in asp.net 3 to return JSON rather than XML. Anyone ever tried/wanted to do this?
Thanks!!
...
Hey everyone,
I'm a complete noob at objective-C, so this might be a very silly question to a lot of you.
Currently, I have a view with a 'SignIn' button, which when clicked, activates a sigupUp IBAction that I have defined below. Basically, this method needs to make a JSON call and get back some data about the user.
So, right now, my...
I have an ExtJS grid connected to a store. When I add a thumbnail column with an <img> tag inside store, grid shows 0. Is there some kind of html filtering? If I change the store data to something without html tags it shows fine. Excuse my awful English and thanks in advance.
...
Is the presence of a \' within double quotes "invalid" in the context of a JSON response?
Is there a definitive JSON spec that could give me an answer?
...
I am using array as an associative array of objects in which keys are ID number of objects in database. Quiet naturally- IDs are large numbers - so that means it is common to have array of length 10^4 with only 20 elements as valid real objects.
I want to send this data back to server but whatever plugins I had to convert js objects to...
Hi people.
I am doing some work with C#, AJAX and JSON and am getting a Self referencing loop error. I am managing to get around this using the JsonIgnore attribute, but I was wondering if someone can give me a proper explanation as to what is actually happening here.
Many thanks.
Dave
...
I try to implement an api for a projekt and found this article http://www.coffeepowered.net/2009/02/16/powerful-easy-dry-multi-format-rest-apis-part-2/
So i get a xml.builder template to build my response and render it to json.
It works great, but
I have some utf-8 encoded Data I want to respond.
First I specify the xml encoding.
Next...
Hi there,
I am using the view_datasource module with drupal5 to get a json view. Now I have a cck-field with radio-boxes and want the key to be displayed in the json. However, it always displays the label.
My allowed value list:
http://dummyimage.com/960x240&text=foo|<img src="http://dummyimage.com/96x24&text=foo">
http:...
jQuery UI Autocomplete uses the variable names "value", "id" and "label" to create the drop down list. For example:
$("#cities").autocomplete({
source: "backend/cities.php",
minLength: 2,
select: function(event, ui) {
city = ui.item.id;
region = ui.item.label;
country = ui.item.value;
}
});
the ...
Hi,
Given I have the following classes,
public class Foo
{
public string Name { get; set; }
public IEnumerable<Bar> Bars { get; set; }
}
public class Bar
{
public int Amount { get; set; }
public Foo Foo { get; set; }
}
public class BarItems
{
public string SomeString { get; set; }
public IEnumerable<Bar> Bars ...
I noticed that the jQuery parseJSON basically does a simple regex "check":
parseJSON: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
}
// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = jQuery.trim( data );
// Make sure the incoming data is actual JSO...
I'm getting crazy over these encoding probs...
I use json_decode and json_encode to store and retrieve data. What I did find out is, that json always needs utf-8. No problem there. I give json 'hellö' in utf-8, in my DB it looks like hellu00f6. Ok, codepoint. But when I use json_decode, it won't decode the codepoint back, so I still hav...
Hello All,
I've been having some trouble finding the problem in my code, so thought I'd try to find a second pair of eyes.
Code:
var logStore = new Ext.data.JsonStore({
autoLoad: true,
url: 'inc/interface/config.php?list=messages',
root: 'logs',
id: 'ID',
fields: ['ReceivedAt', 'Message']
});
var logGrid = new Ex...