json

Reading json return value

Hi there, I have a static web method which returns an object and this object has some values. I am calling this function from an ajax call. $.ajax({ url: "EuclidAktarim.aspx/f_EuclideGonder_", type: "POST", data: "{_sTCKimlikNo:'" + tc + "', _iKlinik_id:" + iKlinikId + ", _iYil:" + iYil + ", _byAy:" ...

Why is my dijit.Tree not populated from json source?

Hi, I am new to dojo and spring development. I am trying to populate a Tree widget using a json response from a spring-mvc controller. I'm following the examples from the dojocampus website quite closely. Firstly if I use a local data source it works ok: <script type="text/javascript"> dojo.require("dojo.data.ItemFileReadStore"); ...

Using HTTPHandler in C# .NET 3.5 with jQuery Week Calendar

I've been trying to get this to work for weeks now, all to no avail. I am sure that my code must be failing through something fairly small and stupid, but having tried a number of different approaches I'm starting to really struggle as to what the problem might be. Has anybody else managed to get the jQuery Week Calendar (http://github.c...

Annotation for Json Model in ASP.Net MVC

Hi, I'm working on an ASP.Net MVC2 application and use the jsTree-Komponent for jQuery to render a tree with checkboxes. To select specific nodes in a convenient way my JSON has to offer a "class" attribute. Here's an example how jsTree wants to consume the JSON result: [{"data":"Root1","attr":{"id":"10","class" : "jstree-checked"} .....

output JSON array in a html table(a jsp page)

Hi, as the title suggested. how do i output a json array correctly in a table from a jsp page? right now whenever i display the json array object using but it just displays the whole contents of it in json string i.e {name: hello, address: baker street } but what i want to do is somehow parse this and display the info appropriatly lik...

C++: How to create an array using boost::property_tree?

I don't see a way to create an array using boost::property tree. The following code ... #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include <iostream> int main() { try { boost::property_tree::ptree props; props.push_back(std::make_pair("foo", "bar")); props.push_back(std::make...

How does the objective-c SBJson library map an array? (do you reccomend it?)

SBJsonParser *parser = [[SBJsonParser alloc] init]; NSMutableArray *componenti = [parser objectWithString:@"[\"Item1\",\"Item2\"]"]; NSAssert([componenti isMemberOfClass:[NSMutableArray class]],@"err"); This code gives me an assertion failed. What is wrong? The header file says: @brief The JSON parser c...

json in java getting the correct values from a list

I am using the package org.json package: I need help with getting the corect data from the json in java. this is the string I have in json: {"GetLocationsResult":[{"ID":82,"Name":"Malmo","isCity":true,"isCounty":false,"isDisctrict":false,"ID_Parent":null,"ID_Map":35,"ZipCode":"7000"},{"ID":82,"Name":"Trelleborg","isCity":true,"isCounty"...

Can't access an NSMutableArray created with Json in another object.

I create an NSMutableArray: SBJsonParser *parser = [[SBJsonParser alloc] init]; NSMutableArray *components = [parser objectWithString:@"[\"Item1\",\"Item2\"]"]; then I access it from the same method: no problem! Then I try to access it from another object: crash!!?? It doesn't happen if i create the NSMutableArray with other means (e....

ASP.net MVC - Strongly typed object to represent a Json Object that I pass to the view

I'm using jqGrid to display some data on a page. Within the controller action, we're using an anonymous object to represent the data that the jqGrid needs. My question is, is there a way we can create a strongly typed object to represent the jqGrid data that we are sending with Json()? Main reason for this is so that we can do unit te...

Does C# have any built in objects for turning JSON text into manageable objects or do I need a third party library?

I have all this JSON text that I want to deserialize (or something) into an object with variables so I can run through it and add/change some things and then serialize it back to text. Is there something built in from Microsoft for this? ...

Displaying JSON Data On A Website

Looking for the best and most simple way to embed and style the data returned from a JSON call, on another web page. Ideally I would like to do this with some sort of simple embed code that someone can place on there page. If not I would like to provide some php code (perhaps along with some css and jquiry) that would allow the user to s...

Spring MVC mappping view for Google-GSON?

Does anyone know if there is a Spring MVC mapping view for Gson? I'm looking for something similar to org.springframework.web.servlet.view.json.MappingJacksonJsonView. Ideally it would take my ModelMap and render it as JSON, respecting my renderedAttributes set in the ContentNegotiatingViewResolver declaration We plan to use Gson exte...

MVC JSON actions returning bool

I had my ASP.NET MVC actions written like this: // // GET: /TaxStatements/CalculateTax/{prettyId} public ActionResult CalculateTax(int prettyId) { if (prettyId == 0) return Json(true, JsonRequestBehavior.AllowGet); TaxStatement selected = _repository.Load(prettyId); return Json(select...

Arrays of Arrays in JSON

Hello, I'm a little new to JSON syntax. I'm trying to learn it correctly. I have a scenario where I have an array of objects. Each object has two properties which themselves are arrays. The root object is called "Department". Each Department has "Managers" and "Employees". At this point, I have the following, but I'm stuck: var depart...

PHP/JSON - stdClass Object

I'm pretty new to arrays still. I need some help - I have some JSON, and I've run it through some PHP that basically parses the JSON and decodes it as follows: stdClass Object ( [2010091907] => stdClass Object ( [home] => stdClass Object ( [score] => stdClass Object ( ...

iOS php json service - format?

I have an iOS app that runs this code: userDict = [[NSDictionary alloc] initWithDictionary:[SantiappsHelper fetchInfoForUDID:@"1"]]; which goes to call this class: (NSDictionary*)fetchInfoForUDID:(NSString *)udid{ NSString *urlString = [NSString stringWithFormat:@"http://www.server.com/app/getusers.php"]; NSLog(@"This is the urlStri...

How to programatically configure binding to force JSON encoding of WCF messages?

I'm creating a custom binding (mostly for diagnostic purposes initially) that programatically changes thw way WCF messages are encoded. Here's what it looks like: public class ConfigurableNetTcpBinding : Binding { public enum MessageEncoding { Text, Binary, MTOM, ByteStream, JSON, }; ...

PHP Array handling for first children

I'm so tired of arrays today - thrown me all over the place. So, here's the output of an array: Array ( [2010091907] => Array ( [home] => Array ( [score] => Array ( [1] => 7 [2] => 17 [3] => 10 ...

Handling JSON in JS/ERB template in Rails 3

I have no trouble making typical AJAX calls to and from Rails(3) with JSON objects and jQuery-rails (jQuery library plus a special rails.js file). In one controller, though, I want to RETURN some JSON in an erb template (create.js.erb) after an AJAX call. I've tried every combination of things in the controller (@object.to_json, '[{"co...