JSON (JavaScript Object Notation) aka the Fat Free Alternative to XML is a lightweight data exchange format inspired by JavaScript object literals. It is often used with JavaScript, Ajax, and RESTful web services but is completely language independent.

learn more… | top users | synonyms

1
vote
1answer
391 views

Web application / Domain model integration using JSON capable DTOs

I'm a bit confused about architectural choices for the web-applications/java/python world. For c/c++ world the available (open source) choices to implement web applications is pretty limited to zero, ...
0
votes
0answers
568 views

Syncing client and server CRUD operations using json and php

I'm working on some code to sync the state of models between client (being a javascript application) and server. Often I end up writing redundant code to track the client and server objects so I can ...
1
vote
2answers
3k views

Is it wise to store a big lump of json on a database row

I have this project which stores product details from amazon into the database. Just to give you an idea on how big it is: [{"title":"Genetic Engineering (Opposing ...
3
votes
1answer
86 views

An extensible logging architecture for Android?

The end goal is to have a variety of data sets that can all be graphically plotted against eachother. All data should correspond to a date, so that when plotted against each other, they show the ...
2
votes
2answers
2k views

An ideal way to decode JSON documents in C?

Assuming I have an API to consume that uses JSON as a data transmission method, what is an ideal way to decode the JSON returned by each API resource? For example, in Java I'd create a class for each ...
2
votes
3answers
506 views

What arguments can I use to justify the use of either XML or JSON to store and transmit object data?

My project lead considers both of these approaches to be unnecessary overhead. I have been involved in and have witnessed a lot of talk around XML vs JSON, but this is the first time that I have heard ...
1
vote
2answers
280 views

Access JSON object in different Languages

I have a Java code which is writing some data in string format to Messaging queue. Now any one can subscribe to this queue and fetch this data. Here the client fetching this data can be written in any ...
1
vote
1answer
203 views

What does it mean for the JSON interchange format to have a license?

A recent flurry of comments on a JSHint issue alerted me to the fact that the JSON data-interchange format has a license. The content of this license can be debated elsewhere. What I'm unclear on is ...
1
vote
3answers
255 views

Is it good idea to change complete enterprise level application into ajax web app [closed]

I am working on an application which is completely written using server side method in asp.net web forms with c# . Now my team lead wants to convert whole application to ajax , in that approach we ...
5
votes
3answers
3k views

Is it OK to return HTML from a JSON API?

On my current project I am responsible for the implementation of a service which involves the consumption of newly created RESTful APIs, documented as solely supporting JSON. The client consistently ...
-3
votes
1answer
222 views

Best Object Oriented way of parsing a model with several fields(>50) and with null checks

I have a JSON-based data which contains many fields from a particular model. Any value from the list of fields can be null. I am trying to find the best object oriented way of parsing it and also it ...
0
votes
1answer
425 views

JSON object and storage of nosql

I have read Would a NoSQL DB be more efficient than a relational DB for storing JSON objects? and am building a small test project in Asp.Net. I have a webapi up in Azure. It returns a ...
2
votes
1answer
307 views

Use a search box that calls on a JSON file? [closed]

I use a JSON file to populate several drop down lists. The format is: { "value" :"lightyear", "name" :"Light Year(yl)" }, { "value" :"astronomicalUnit", ...
5
votes
3answers
2k views

Can a webservice that uses JSON over POST be classified as RESTful?

Recently I have started using a new(to me) paradigm for web services. I use the controller to accept JSON strings sent over POST, process it and return JSON strings. GET, PUT, DELETE and other methods ...
3
votes
3answers
707 views

Use of Abstract Syntax Notation (ASN.1)

The problem of Electronic Data Interchange over networks is well known and understood. Today, the most common formats for data interchange are things like XML and JSON. There are various pros and ...
2
votes
2answers
413 views

XML/HTML: Do we need the element name in closing tags?

Compared to other serialization languages, one of the main criticisms directed at XML is its verbosity; JSON's more terse and readable for most cases, but not all. But it seems to me that we could ...
1
vote
3answers
534 views

How can I return generated HTML and a response too?

My web application will use AJAX calls often and so I have set up some JavaScript to handle "messages" or "responses". These responses are returned (from my ASP.NET application) as JSON objects that ...
1
vote
1answer
157 views

Is it evil to model JSON responses to classes when they are mostly smilar?

Here's the problem : While implementing a C# wrapper for an online API (Discogs) I've been faced to a dilemma : quite often the responses returned have mostly similar members and while modeling these ...
0
votes
1answer
579 views

JSON or XML for parsing for a Windows Store 8 applicaiton?

I am getting some data from Gov tracker (http://www.govtrack.us/developers/api) and creating a Windows 8 Store application.. I started out trying to use the HttpClient to get the JSON and then use ...
7
votes
4answers
791 views

Building a web application that is almost completely rendered by Javascript, while back end only delivers Json. Do or don't?

As a programmer, and taking into account the overall "funness" of the process, I'm tempted to start a project in Sinatra where the back end's sole concern is the logic, and returning a Json API, and ...
26
votes
11answers
6k views

RESTful API design. What should I return if there are no rows?

I'm currently coding an API for a social network with the Slim Framework. My question is: What are the best practices when there are no rows to return in the json structure? Lets say that this call ...
5
votes
1answer
1k views

Building a Graph Editor - How to create a data driven graph

I am developing a graph-editor that uses drag and drop to build hierarchical graphs (containing nodes and links). Each node in the graph should be linked to a table in our database (SQL Server). I did ...
1
vote
2answers
372 views

JSON vs Foreign Keys

I'm developing an enterprise website, and I have to define some sections like this: I have many sections and each section have many (or one) sub-pages. The number of sub-pages vary per section. ...
0
votes
1answer
113 views

Evaluating JSON from popular auto-suggests

I was evaluating the various ways in which the big guys implement auto suggest. These are my observations.(Search string used was "ab") Questions towards the end. Yahoo tries something like this, ...
0
votes
0answers
382 views

Best option to send image from javascript client to SQL server

From a client (browser), using javascript I want to send an image to sql server ( and store with user profile) (sql server), along with other data such as user id or name. Which option is better? ...
1
vote
3answers
643 views

Designing a self-describing JSON document system

I'm trying to devise a document system for a specific domain involving simple objects (People, Companies, Invoices, etc.) that would also be able to completely describe itself. This self-description ...
2
votes
2answers
857 views

Which is simpler for REST client call to return JSON - JQuery/JavaScript or Spring RestTemplate? [closed]

I've been trying to hack up an annotated Spring MVC web app but it's proving pretty hard to call a URL of my web app which fires a request to a remote API (UK Police data) and recieves a reply which I ...
2
votes
1answer
472 views

Pros and cons of sending data from android to php in string and/or json

I have seen some tutorials and some stackoverflow discussions on how to send data from android to php page. most of the cases i have seen people sending data in string format but returning in json ...
1
vote
3answers
2k views

Why does Java require a servlet container for simple RPC service?

I have a big database controller which is written in Java. The controller reads information from the database, and interprets it into data structures which are then displayed in a CLI. Java was ...
-3
votes
1answer
240 views

Reinventing the wheel, or the technology that drives it? [closed]

I recently asked a question on StackOverflow that was related to string splitting and pattern matching in .NET. Some beady eyed developers that viewed the question said: "It looks like you're trying ...
2
votes
1answer
213 views

Consuming JSON stream into AWS Database on the cheap [closed]

I'm working on a project that needs to consume a JSON stream (approximately 1MB / minute), and parse and insert objects into a database. Amazon's DynamoDB or SimpleDB seem like attractive options for ...
3
votes
1answer
2k views

Should web service response use a base class or generic class?

In my RESTful WCF web service I have something like the following response object. public class WebResponse<T> { public bool Success { get; set; } public T Data { get; set; } ...
2
votes
1answer
517 views

How best to merge/sort/page through tons of JSON arrays?

Here's the scenario: Say you have millions of JSON documents stored as text files. Each JSON document is an array of "activity" objects, each of which contain a "created_datetime" attribute. What is ...
3
votes
2answers
2k views

Why is NoSQL better for this scenario?

Hypothetical scenario: Let's say we are downloading JSON from Facebook with details of a user's friend's checkins, posts, etc... These come in as one document per friend per activity, so with 8 ...
1
vote
1answer
678 views

Should one declare alternative response types (e.g. JSON) in Rails controller actions even if not utilising them?

Just wondering what the accepted convention is for Rails controller design. Currently, every controller in my app that I've written it set up to send a JSON response when necessary. Thing is, I only ...
10
votes
5answers
1k views

Should I use JSON just to use JSON

I'm building a blogging site for learning, with a PHP/MySQl back-end. All of the user input is handled with forms sent in POST requests. Will using JSON somehow make it cleaner, or easier to maintain ...
0
votes
2answers
173 views

Parsing stdout with custom format or standard format?

To integrate with other executables, a executable may launch another executable and capture its output from stdout. But most programs writes the output message to stdout in custom format and usually ...
1
vote
1answer
1k views

Is the escaping provided by the Google-Gson library enough to ensure a safe JSON payload?

I am currently using the Google-Gson library to convert Java objects into JSON inside a web service. Once the object has been converted to JSON, it is returned to the client to be converted into a ...
6
votes
7answers
1k views

Is using something other than XML advisable for my configuration file?

I have a small tool I'm designing which would require a configuration file of some sort. The configuration file in my case is really more of a database, but it needs to be lightweight, and if needed ...
5
votes
2answers
391 views

Logging in JSON Effect on Performance

I see more and more articles about logging in JSON. You can also find one on NodeJS blog. Why does everyone like it so much? I can only see more operations getting involved: A couple new objects ...
3
votes
4answers
275 views

Making simple forms in web applications [closed]

How do you work with forms in your web applications? I am not talking about RESTful applications, I don't want to build heavy front-end using frameworks like Backbone. For example, I need to add ...
5
votes
2answers
777 views

Proper Use Of HTML Data Attributes

I'm writing several JavaScript plugins that are run automatically when the proper HTML markup is detected on the page. For example, when a tabs class is detected, the tabs plugin is loaded dynamically ...
6
votes
8answers
1k views

Should all new web projects build their backend based on xml/json result sets? [closed]

If you were building a new Saas project, would it make sense to start with all of the backend services returning xml/json? Because these days you need to build for both the web and mobile devices, ...
3
votes
1answer
211 views

Design considerations on JSON schema for scalars with a consistent attachment property

I'm trying to create a JSON schema for the results of doing statistical analysis based on disparate pieces of data. The current schema I have looks something like this: { // Basic key ...
1
vote
2answers
615 views

Should I create specific classes for JSON Objects or only use the container(Array/Dictionary) for accessing Data?

I'm using Foursquare to get a List of Restaurants nearby inside an iOS app. The Result is stored in an Array which consists of Dictionaries and regarding how deep the Data is, each Dictionary contains ...
2
votes
4answers
527 views

Should an API platform enforce only receiving JSON requests?

I am building an API platform. I have already ensured that the platform always returns JSON responses. My question is Should my API platform enforce the rule that all requests must be JSON? What ...
1
vote
1answer
150 views

Security using jsonp

I'm writing an app that will make available a set of api functions that require cross site scripting to work. I'll be utilizing jsonp which will allow other developers to consume these services for ...
2
votes
1answer
95 views

Naming library which generates a JSON-req to a REST-API?

How would you call a library which generates a JSON-req to a REST-API so that you just work on object-level for creating a request? Many company wants to define it as an SDK, but is it a suitable ...
4
votes
3answers
10k views

Fastest way to set up a JSON server on my local machine [closed]

I am a front-end developer. For many experiements I do I need to have a server that talks JSON with my client side app. Normally that server is a simple server that response to my POSTs and GETs. For ...
1
vote
2answers
150 views

Queries about commercial products about using freewares libraries

I'm looking at developing some commercial product (sell for money, only binaries, no sourcecodes). I have read up on open source licensing, but I just could not understand if what I want to achieve is ...