Questions tagged [json]
JSON (JavaScript Object Notation) is a serializable data interchange format that is a machine and human readable. Do not use this tag for native JavaScript objects or JavaScript object literals. Before you ask a question, validate your JSON using a JSON validator such as JSONLint (https://jsonlint.com).
361,105
questions
3
votes
2
answers
6k
views
Returning a JSON object from a PageMethod with custom formatting
Is it possible to format how an object is returned as JSON from a PageMethod? ie. removing the first "d" element from the data, without writing the JSON from scratch.
From:
{ "d": { "name": "bob", "...
3
votes
6
answers
9k
views
FilteringSelect with a QueryReadStore: selection doesn't stick
I am using a dijit.form.FilteringSelect backed by a dojox.data.QueryReadStore in order to allow the user to select a region (think "auto-complete" mechanism). On each character entered by the user, ...
66
votes
7
answers
114k
views
How to convert XML to JSON in Python? [duplicate]
Possible Duplicate:
Converting XML to JSON using Python?
I'm doing some work on App Engine and I need to convert an XML document being retrieved from a remote server into an equivalent JSON ...
1
vote
3
answers
3k
views
Security and Cross Domain with ASP.NET MVC JsonResult and jQuery
I am using asp.net MVC to develop an application that will have ajax interactions. I have JsonResult methods in the controller returning my json serialized data. So for example when a request is made ...
9
votes
10
answers
35k
views
Loading Flexigrid for jQuery with JSON String
I am trying to load the Flexigrid by using a JSON String which is returned by a WCF Service.
My Service has a public string GetContacts(string CustomerID) method and it returns a Json string.
That ...
0
votes
5
answers
1k
views
Is it possible to get the "schema" of a json file?
So, I have a json file and I want to get the names of all the fields in the file using javascript. Is there a better way other than using eval and then using reflection on the resulting object? Or ...
0
votes
2
answers
2k
views
Parsing jQuery data in JavaScript (JSON)
I am using PHP, jQuery, and JSON. Now I need to know how to parse the jQuery data in JavaScript.
load.php
<?php
...
$json =json_encode($array);
?>
It returns jQuery by the following ...
2
votes
3
answers
19k
views
JSON object value from PHP
I am using JSON in PHP, and now I need to access it from JavaScript. How do I pass a JSON object to JavaScript?
<?php
$array = array("a"=>"Caucho", "b"=>"Resin", "c"=>"Quercus");
$...
6
votes
2
answers
9k
views
Custom C# data transfer objects from javascript PageMethods
I've created a custom object that I'd like to return in JSON to a javascript method. This object was created as a class in C#.
What's the best way to return this object from a PageMethod ([...
41
votes
9
answers
94k
views
Convert a multidimensional javascript array to JSON?
What is the best way of converting a multi-dimensional javascript array to JSON?
2
votes
2
answers
12k
views
How to read multi-level Json data by using jQuery?
Here is my Json data:
[{"ok" : false,
"details" : [{"n" : "Email",
"v" : "The email address you entered is not correct."},
{"n" : "NameFull",
"v" : "...
1
vote
3
answers
435
views
Conflict between avoiding anemic model and allowing serialization
In this answer to a recent question, I was advised to "be wary of making every property in your domain model have public getters and setters. That can lead you to an anemic domain model."
However I ...
413
votes
13
answers
223k
views
JSON datetime between Python and JavaScript
I want to send a datetime.datetime object in serialized form from Python using JSON and de-serialize in JavaScript using JSON. What is the best way to do this?
2
votes
1
answer
664
views
How to create a controller method in Turbogears that can be called from within the controller, or rendered with a template
If you have a controller method like so:
@expose("json")
def artists(self, action="view",artist_id=None):
artists=session.query(model.Artist).all()
return dict(artists=artists)
How can you ...
2
votes
3
answers
596
views
Best way to generate Json-friendly result (.NET MVC)
I'm now using ListItem() for Json format result, but the generated Json text has an extra property called "selected = false", I know this is used for drop down list, but I want my app runs faster so I ...