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

0
votes
1answer
525 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 ...
6
votes
4answers
685 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 ...
24
votes
10answers
5k 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 ...
4
votes
1answer
828 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
310 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
98 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
1answer
273 views

Recommendations on what technology to use to call REST API [closed]

I'm creating a small web-site that needs to call a REST API to retrieve some JSON and display it. What is the best tool for this job? There are so many Javascript libraries available now it is ...
0
votes
0answers
324 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
492 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
799 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
427 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
1k 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
236 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
191 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
477 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
1k 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
594 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
904 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
166 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
661 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
853 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
350 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
274 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
658 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
953 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
207 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
580 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
476 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
138 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 ...
3
votes
3answers
9k 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
144 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 ...
4
votes
4answers
4k views

Always return single objects in an array for REST API JSON payloads?

For a REST API that I am working on, I want to return JSON in a consistent layout: { "Data" : { "Id" : 123, "Email" : "charlie@somewhere.com" "Firstname" : "Charlie", "Surname" ...
-1
votes
1answer
2k views

Google-Gson Converting JSon to CSV

What is the easiest way to convert a Json data to a String at CSV format ? I haven't read all the api yet but it seems that subclassing the default JSonWriter allows to remove unnecessary character ...
0
votes
2answers
280 views

How to connect iPad app to an app I have running in Windows

I recently picked up a macbook and want to start doing some apps for my ipad. I have a chat client written in c# that interfaces a game I play. What I would like to do is write an app for the ipad ...
0
votes
1answer
275 views

JSON-based Ajax Checkout experience - is it safe?

For a mobile, e-commerce site, that follows the client-server model, where all the views are json-ajax calls to return data from a secure service, is it safe to also pass the "checkout" process ...
5
votes
3answers
4k views

Best method of communication between your app and your website? PHP, Web service, etc

I am creating an application which I would like to have communicate with my website. The app will have to get data for a particular app user from the website's database. I am unclear as to the best ...
12
votes
2answers
1k views

Query language for JSON

I have a server which is returning very big JSON message and my client application is only dependent on part of this response. Client application needs to check if "xyz" property exist in JSON message ...
3
votes
3answers
292 views

Feedback on this back-end stack

I'm planning to setup an scalable architecture capable of providing web services on a REST interface where JSON will be sent as a result. The web services will be quite simple for a CRUD web 2.0 app. ...
2
votes
1answer
4k views

Automatically adding data from JSON to SQL

I'm really new to this sort of stuff; my background is in C# mainly. Could anyone point me in the right direction? I need to set a script to automatically parse some JSON into an SQL database ...
2
votes
3answers
689 views

What do you think of this Exception handling practice

I'm working on a project that includes a lot of creating/manipulating and reading JSONObjects and arrays but not in a systematic way. So there is JSON code everywhere. It is ok for me except that ...
0
votes
2answers
631 views

A good substitute for ASMX web service methods, but not a general handler

The best thing I like about ASP.NET MVC, is that you can directly call a server method (called action), from the client. This is so convenient, and so straightforward, that I really like to implement ...
1
vote
2answers
1k views

Why did javascript libraries like knockoutjs, backbonejs, and angularjs only come out in 2010?

Being a relatively new web-developer I am surprised that these libraries didn't exist before. Is there a particular technical or historical reason that at around Sep 2010, a sudden development and ...
0
votes
3answers
572 views

What is likely to be the bottleneck between the SQL Server, IIS and .net when receiving json as text from the DB?

I have spent the best part of a month working on the jQuery Calendar plugin. The setup is such that all the calendar entries are stored in a table inside SQL Server and im using a single "Select As" ...
5
votes
3answers
2k views

Would a NoSQL DB be more efficient than a relational DB for storing JSON objects?

I am using a library that returns a JSON object (as a string, but I think that's standard), and I would like to store the contents of this object into a local database. I'm fairly fresh-faced in ...
55
votes
12answers
7k views

Can we replace XML with JSON entirely? [closed]

I'm sure lots of developers are familiar with XML and JSON, and they've used both of them. Thus no point in explaining what they are, and what is their purpose, even in brief. If we try to map their ...
3
votes
2answers
4k views

xml parser vs JSON parser performance in Java / C / C++

I am trying to understand which data format is better on embedded device communicating with Server over REST API. XML or JSON?. Is JSON parsing faster than XML parsing in Java / C and C++? I ...
12
votes
4answers
3k views

Should I include HTML markup in my JSON response?

In an e-commerce site, when adding an item to a cart, I'd like to show a popup window with the options you can choose. Imagine you're ordering an iPod Shuffle and now you have to choose the color and ...
4
votes
1answer
255 views

Advice on JavaScript library for visualizing Yahoo Pipe Output

I'm currently writing a JavaScript library. It is a project for school were I need to make it easier to visualize data from Yahoo Pipes. The data format is a JSON string, which can contain anything, ...