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

-2
votes
0answers
21 views

Accessing Dynamically create div via js [on hold]

I have created a tiny little script to fetch data from a json database, then insert said data into dynamically created divs in the browser. Only when i search for them using ...
3
votes
3answers
173 views

Anything wrong with direct evaluation of JSON if your own code created it?

Suppose I have a server-side variable containing JSON (named strJSON) that my own code created. In JavaScript I can consume it like this: var data = <%= strJSON %>; or use a JSON parsing ...
0
votes
2answers
309 views

REST API - Should API Return Nested JSON Objects?

When it comes to JSON APIs is it good practice to flatten out responses and avoid nested JSON objects? As an example lets say we have an API similar to IMDb but for video games. There are a couple ...
2
votes
2answers
298 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 ...
2
votes
1answer
71 views

How to deal with server-side and client-side naming conventions that clash? [closed]

I have a project that uses the underscore naming convention for the MySQL database and PHP scripts but uses camelCase for the javascript application (a common scenario I'm sure). However, once JSON ...
0
votes
1answer
83 views

Best strategy for storing static data : json file vs DB (mongo) vs redis [closed]

I'm currently designing a set of webservices related to travel industry. one of this service need to be take in input a airport code and a locale, and return the localized city name. fn(cityCode) ...
1
vote
3answers
281 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
45 views

Data inter-exchange with C

I'm developing a system in which a C coded TCP server is listening for new connections from clients, on connection parse the data & store into database. I'm familiar with JSON, and would like to ...
0
votes
1answer
55 views

Dynamic model based on JSON received from web service

I am creating a MVC web application which receives some data from a web service in JSON format. I get the different content type structures and data items related to that structure. Using that JSON I ...
1
vote
4answers
215 views

Use JSON objects or POJOs in back end service?

I'm building a back end service for mobile clients. The requirement is that the mobile clients will pass me a token, I'll use that token to talk to other systems (behind the company firewall) in my ...
0
votes
1answer
58 views

JSON or protocol buffer to replace the custom TCP message

Originally, We have two applications communication with TCP/IP, and both of them are implemented by C++. The messages between them are custom message type. Now the client program will be changed to ...
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
3answers
471 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 ...
2
votes
1answer
73 views

What is the purpose of building a client library? [closed]

I'm currently developing a client library for Gengo in Go. There are many resources on how to build a good API but I haven't found anything on how to build a good client library. Some developers ...
2
votes
2answers
311 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 ...
0
votes
1answer
72 views

Does a Form describing JSON “Standard” exist?

I joined a project were we sell services for different providers through web, iOS and android apps. I am working on iOS. I was ask to display a purchase form via a web view and react by what is ...
1
vote
1answer
114 views

A very simple database system with JSON

If we need to store some data in a database, but without the need of advanced SQL features, can we use this scheme (written here in Javascript / node.js) : // the DB will be in RAM ! var myDb = {}; ...
16
votes
4answers
2k 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 ...
5
votes
3answers
321 views

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

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 ...
0
votes
1answer
83 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
11k 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 ...
0
votes
0answers
22 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 ...
0
votes
0answers
178 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
169 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
209 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 ...
0
votes
3answers
285 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 ...
27
votes
11answers
7k 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 ...
0
votes
3answers
145 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 ...
1
vote
1answer
138 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
352 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
126 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
622 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
648 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 ...
4
votes
4answers
416 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 ...
1
vote
0answers
53 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
326 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 ...
1
vote
1answer
837 views

synchronization web service methodologies or papers [closed]

I am building a web service (PHP+JSON) to sync with my iphone app. The main goals are: Backup Provide a web view for printing / sorting, manipulating. allow a group sync up and down. I am aware of ...
4
votes
3answers
9k 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 ...
5
votes
4answers
7k 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 ...
0
votes
1answer
89 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
2answers
155 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 ...
0
votes
1answer
150 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
0answers
118 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 ...
1
vote
1answer
692 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
168 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
654 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
233 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
134 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
173 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 ...
3
votes
6answers
6k 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 ...