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,081
questions
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 ...
29
votes
7
answers
180k
views
How do I get the total Json record count using JQuery?
I couldn't find anything about getting the total JSON record count using jQuery.
Here is the JSON returned:
{"Email":"Please enter your Email.","Password":"Please enter a password."}
Here is my ...
6
votes
3
answers
9k
views
What is the practical difference between xml, json, rss and atom when interfacing with Twitter?
I'm new to web services and as an introduction I'm playing around with the Twitter API using the Twisted framework in python. I've read up on the different formats they offer, but it's still not clear ...
21
votes
1
answer
32k
views
DataTable to JSON [duplicate]
I recently needed to serialize a datatable to JSON. Where I'm at we're still on .Net 2.0, so I can't use the JSON serializer in .Net 3.5. I figured this must have been done before, so I went looking ...
13
votes
4
answers
6k
views
iPhone SQLite DB and Web-based DB synchronization and interaction recommendations
I'm in the process of developing my second iPhone application, and am looking for architectural recommendations on DB handling.
The idea is:
1. A database of information is stored on a server (LAMP ...
3
votes
2
answers
2k
views
Expose a specific .net object as JSON
I'm currently enabling JSON calls to my web services using the ScriptService attribute. The problem is that one of my classes references a second class and .Net is not picking up and writing out the ...
0
votes
4
answers
6k
views
Represent a query string in JSON
I have this Javascript data:
[{id:123,type:"test"},{id:154,type:"another"}]
How would you transform that into something so that I can pass it as a HTTP post request?
menu[0][id] = 123
menu[0][type] ...
7
votes
9
answers
5k
views
Why should I use JSON with ASP.NET?
Why should I use JSON with ASP.NET? Can you give a practical example? I have read articles but not so good.
0
votes
2
answers
4k
views
Struts2 JSON Plugin not working with "lazy" data
I have an Entity with a OneToOne relation that is fetched lazily:
@Entity
public class Person {
@Id
private Integer id;
@Column(length=60)
private String address;
@OneToOne(...
2
votes
2
answers
4k
views
Trying to return asp.net mvc JSONResult with VB.Net
I'm trying to return a record from LINQ2SQL as a JsonResult to update my view page via jquery ajax. I'll post my code below. When I follow it through the debugger my function in the controller is ...