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

13
votes
3answers
1k views

Should a front-end developer ever specify JSON format for back-end developers?

I am taking the front-end role in a project. Should I be specifying for my back-end teammates the exact format of JSON that their PHP returns to my JavaScript? For example, should I be telling them ...
0
votes
1answer
48 views

Do I need to follow hypermedia format or a schema?

I'm quite new to the field. So I need to clarify what would be the best method to follow in the following situation. I'm developing a restful API using php and use json to represent resources. While ...
5
votes
3answers
252 views

What are technologies like XML, JSON, and YAML classified under? [on hold]

What are technologies like XML, JSON, and YAML classified as? I already looked at Query Language Data-structured Language But neither appeared accurate... None of them are really meant for ...
2
votes
1answer
110 views

PHP MVC as backend for iOS app

So, essentially, the question is, to develop a PHP back-end to an iOS application, would you implement an MVC architecture on the PHP side? Or no, since the client side (iOS) already has an MVC ...
1
vote
2answers
166 views

XSLT equivalent for JSON

I was interested in finding (or if necessary developing) an XSLT equivalent for JSON. As I have not found any, I was considering the possible query language to use for matching JSON paths so as to ...
0
votes
0answers
19 views

Posting different-shaped json documents to the same resource in an API

Is it a good idea to create an API in such a way that clients can post different shaped JSON documents to the same Resource? Let me give you an example and and explanation to why I am asking this. I ...
-3
votes
0answers
20 views

Why is my use of .getJSON not consistently reading local JSON files? [migrated]

Here is a simple working example that reads two local data files and appends the results to the DOM displaying a card and then an unordered list representing a hand of cards. app.js var main = ...
0
votes
0answers
68 views

Managing Login Authentication/Webpage session: Can client side javascript/JQuery access either a session variable or json variable in html?

Short version: A variable is stored in a session variable req.session.userName and also in the json sent with res.render('/', {username: value}). How can I access either of those variables from inside ...
1
vote
0answers
142 views

C# structure needed for dynamic behaviour

I am using Unity to build a visualisation of a serious game. I am using the C# programming language. My problem is that I receive data from a JSON and I parse it and I end up with a list of different ...
-1
votes
3answers
195 views

Why don't replace HTML with JSON as base web design technology? [closed]

Since JSON shows a lot of benefits over HTML, why don't just abandon HTML? Qt frameworks with QML shows it is perfectly possible to use JSON to design rich content EDIT: Many of you think about this ...
1
vote
1answer
174 views

Best OOP pattern to use for creating a commandline SQL API for a proprietary json based company datastore

We need to create a SQL commandline tool for querying a proprietary json based datastore. I'll be using java. Any suggestions on the primary OOP design pattern I should use for building this API? ...
0
votes
3answers
203 views

Java Serialization for long-ish-term storage

I have an application that uses a database of about 15,000 Java objects, which I have to read every time the application starts. Originally I've been using JSON to store the data, but that has a few ...
0
votes
3answers
140 views

What is the most robust, extensible way to represent a contract in code? [closed]

I would like to find or create a syntax to express business contracts programmatically, and I am looking for a robust, flexible, future-resistant way to do this. A client should be able to add a ...
2
votes
1answer
182 views

What's the best way of building an administrative UI for an existing SPA application?

I’m working on an application where the client-side interface and backend server are completely separate applications. The backend is written in Ruby and only serves JSON via HTTP. The client is a ...
1
vote
1answer
115 views

What standard to use for RESTful JSON API [closed]

I am currently reading the book RESTful Web APIs by Leonard Richardson, Mike Amundsen and Sam Ruby, that describes the Collection+JSON pattern, and while searching around the web during my exploration ...
1
vote
0answers
233 views

How do I resolve $ref in a JSON object?

I have written a single page application that uses rest services to retrieve JSON objects. The JSON objects being returned are C# objects serialized using the Newtonsoft.JSON library. The returned ...
2
votes
1answer
76 views

Using json as database with EF, how can I link EF and the json file during DbContext initialization?

For a personal testing-project I am considering to create a SPA with the following technologies: ASP.NET MVC + EF + WebAPI + AngularJS. The project will make use of small amount of data, so I was ...
0
votes
1answer
350 views

API always returns JSONObject or JSONArray Best practices

I'm making an API that will return data in JSON. I also wanted on client side to make an utility class to call this API. Something like : JSONObject sendGetRequest(Url url); JSONObject ...
9
votes
4answers
576 views

Should I parse XML on the server or provide a proxy and let the browser parse it?

I need to interface with a 3rd party API. With this API I make a GET request from within the end user's browser and receive an XML response. This data is to be used in a browser based application ...
1
vote
0answers
40 views

Defining user operations on application/collection+json response?

I'm fairly new to Collection+JSON. I have a bunch of questions regarding Collection+JSON and user operations. Use Case Having user permissions in a Collection+JSON response would be useful in ...
2
votes
2answers
271 views

Best pratice for return json in a REST application?

I'm starting now with REST (using Laravel 4.2) and Mobile (Android, iOS, SP, etc.) applications. Initially I'm checking if the request is ajax/json and then return a json response. But this ...
4
votes
4answers
373 views

How to write JavaScript while keeping HTML/CSS out of it

What is / are some recommended ways to write JavaScript as to control behavior of showing HTML on screen, while keeping well-maintainable code? Basically, I started to look for ways to keep HTML/CSS ...
0
votes
1answer
84 views

What are “siblings” of .json files?

I was reading through the documentation for Bower here and I read this line: "The .bowerrc file should be a sibling of your project's bower.json." What does that mean exactly? Searching Google ...
0
votes
0answers
79 views

How to implement proper identification and session managent on json post requests?

I have some minor messaging connection to server from website via json requests. I have single endpoint which distributes requests according to identification data. I am using asynchronous server and ...
0
votes
1answer
120 views

Best practice for managing dynamic HTML modules?

I've been building web apps that add and remove lots of dynamic content and even structure within the page, and I'm not impressed by the method I'm using to do it. When I want to add a section or ...
0
votes
2answers
127 views

High-level strategy for distinguishing a regular string from invalid JSON (ie. JSON-like string detection)

Disclaimer On Absence of Code: I have no code to post because I haven't started writing; was looking for more theoretical guidance as I doubt I'll have trouble coding it but am pretty befuddled on ...
1
vote
1answer
458 views

Creating objects with user-defined variable names

Context: I am making a learning project in XNA. What I would like to be able to do is allow the game to be moddable by allowing the users to place arbitrary values into a JSON data file which is read ...
2
votes
1answer
132 views

Front-End Business Rules / JSON

I am working on a project that now needs business rules. One design discussed is to make API calls (based on the form we are on) which responds with business rules for form input. I am unsure if this ...
0
votes
1answer
447 views

Using subclasses for DataContracts used with JSON

I have a RESTful call that can modify the state of an instance. My problem is that the JSON is different based on the type of action the user is taking, it could be a SetProperty action or a SetState ...
2
votes
2answers
160 views

Should a REST interface include the query ID as part of the response?

I am currently working an Android app that receives most of the displayed data from a REST interface. First, I request the information for a company the request includes a list of store IDs. With ...
1
vote
1answer
132 views

long lines in git or svn

I am coding a program which has persistent data (the MELT monitor, related to GCC MELT). The data is persistent because it is expected to be read and overwritten by most executions. (That data is in ...
1
vote
0answers
150 views

JSON or XML for parsing for Google Map API

Can someone help me to find a easy way to parse XML? I have an iOS 7 Application using Google Map API. I tried to learn this on my own. I try to create an application that uses Web Services like ...
1
vote
4answers
425 views

Why returning XML/JSON for API requests, can't we just directly process request and return the modified web page (HTML/CSS/JS)?

Let's say that a user requests for some piece of data. Usually the data is processed via a server and then returned in XML/JSON format. Im guessing another piece of processing happens to convert it ...
3
votes
6answers
4k views

Using a relational database vs JSON objects for event/activity data

I am working on a project where I am trying to decide between using a standard SQL relational database or JSON objects to store data about an event or activity. The project will store data on ...
0
votes
1answer
153 views

JSON - Ruby objects key naming

Ruby object has method/property: def tentakles_count 8 end JavaScript object has key/property: { justEnough: true } Now, when JavaScript gets serialised ruby object via XHR or WebSocket, ...
1
vote
1answer
226 views

Is parsing a submitted JSON object safe?

I have a RESTful API, built in NODE.js that does what you would expect it to: consumes data and then makes it accessible. Currently, data being submitted to my server is nested form data: ...
0
votes
1answer
72 views

What is the meaning of MODULE_LICENSE_BSD_LIKE in Android source code? [closed]

In Android source code, we see files like MODULE_LICENSE_APACHE2, MODULE_LICENSE_BSD_LIKE, MODULE_LICENSE_W3C. An outside observer would think that these specify the intended license that applies to ...
0
votes
3answers
346 views

suggest structure for classes that maps to json with dynamic data without using dynamic or object reference

this is a kind of data i have to de-serialize { "id": "M:11427", "title": "DAX30", "nextStartId": "S:727831", "sections": [ { "type": "HIGHLIGHTS", ...
1
vote
2answers
413 views

Proper way to structure JSON for front-end consumption

Having worked on several different web application code bases, I've seen some divergence in how back-ends serving JSON to front-ends structure that data. In particular, when a backend wants to return ...
0
votes
1answer
77 views

What does &callback= do

I am trying to create a timer that ever x minutes it will call to a server, get a JSON file and do something with it. The merits of that system are not in question right now, the question involves ...
4
votes
4answers
5k views

How to get around the Circular Reference issue with JSON and Entity

I have been experimenting with creating a website that leverages MVC with JSON for my presentation layer and Entity framework for data model/database. My Issue comes into play with serializing my ...
1
vote
2answers
201 views

Why is the json format necessary over the normal javascript object format?

Before you answer, yes I know that other languages have no native javascript object support, but neither do they have native support for json. So wouldn't it make much more sense to modify the json ...
1
vote
1answer
2k views

JSON Library - Jackson or Play Framework? [closed]

Working on a Java and Scala code-base, there's a debate about whether to use Java's Jackson JSON or the Play Framework's JSON Library. After reading the Play JSON Docs, as well as Chapter 9 (JSON) of ...
6
votes
2answers
208 views

How can I share data across several websites?

I am trying to develop a simple system for sharing data across several websites. Most of them are developed in PHP while some are developed in Wordpress/Drupal. Redundant information is spread across ...
0
votes
0answers
86 views

Can I share ~1k of dynamically updated data between HTML5/JS pages using only apache2?

I have an HTML5/Javascript web site. There is a form which updates JSON data. There are other pages which I would like to load that JSON data dynamically. I know how to do this via Tomcat/JSP but I'd ...
3
votes
1answer
896 views

Is it possible to protect json api scraping using random tokens?

I have built a restful json api for an online store using Laravel. I now wish to create an AngularJS app to run the front-end web application. Product prices for my store need to update every second, ...
1
vote
1answer
182 views

Image strategy on Android

I am creating an application with lots of photos. They will take > 100 mb on memory. So far I have 3 ideas: Place it in @drawable - app will be heavy Download by JSON and place in java ...
0
votes
1answer
80 views

What is a cross-platform way to expose an Array[][] over a webservice? Any JSON nuances to be aware of?

I need to expose an Array[][] to many different clients (iPhone, Android, PC, Unix, etc), and need to make it available over HTTP/s This brings me to JSON, and makes me wonder how do all the other ...
3
votes
2answers
389 views

Shoud I directly return a string message or rather a i18n key when dealing with JSON api?

Suppose a rest api returning this json: { "status" : "fail", "data" : { "title" : "A title is required" } } Since the client application would always adapt the error message, would it be ...
4
votes
3answers
7k views

What is the need of Odata when I have JSON ?

I am trying to understand the point of Odata and when it would make sense. Right now how I work is I use ASP.NET and MVC/WebApi controller to serialize/deserialize objects into JSON and have ...