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
2answers
59 views

Using jQuery and AJAX process a form with PHP

I'm looking to collect form input and pass it to a file called processing.php with AJAX JS: ...
0
votes
1answer
61 views

Making a webService file smaller [closed]

I'm developing an iOS app, and I have a file, WebService.m, that is now 2300 lines long. My file contains all the web service calls on my app, with their parsing if successful, like: ...
5
votes
1answer
67 views

Using Reddit API in R

I'm scraping some comments from Reddit using Reddit JSON API and R. Since the data does not have a flat structure, extracting it is a little tricky, but I've found a way. To give you a flavour of ...
4
votes
2answers
114 views

Serializing data from two URLs in the same object efficiently

This is a follow-up to: Serializing JSON data coming from two URLs in the same object I have two URLs (urlA and urlB) and they ...
2
votes
1answer
62 views

JavaScript function for taking JSON data and formatting in to HTML table

I have written a JavaScript function that takes JSON encoded data and then, with conditionals, formats that data into a table. I asked this question not so long ago but that was just a snippet of ...
3
votes
2answers
83 views

Better paradigms for posting JSON from a table?

With a table based interface where users can update the rows by pressing a button. Perhaps there is a better way of doing this, without pressing a button, i.e. post on textarea/row change (could be a ...
1
vote
0answers
56 views

JSON String hashing within PHP Servers' memory

I was asked to create a code that would Hash, or store the JSON files at the PHP server per User basis. Originally, the JSON objects sat on separate server. But now they are sitting at the Web/PHP ...
3
votes
1answer
21 views

Update only specific field of specific item (data) in List from YAML

I don't like the logic to update [Repository] list here because I need to map whole list to change only specific field of specific node, I especially don't like ...
2
votes
1answer
79 views

Getting multiple keys' values from nested object in JSON (w/out jQuery)

I'd like to ask if either my JSON data is ill-conceived and whether how I solved it is particularly inefficient/plain stupid/typical. Given the following JSON data: ...
2
votes
1answer
55 views

Node.js JSON searching & updating

I'm working on a web-based on/off controller for multiple switches. I'm looking for a good way to manage the current state of a switch and updating the current state on change. So far I've got a ...
7
votes
3answers
389 views

Ticket management system

I am building a ticket management system for a state server we use at work. Back end is node.js with multiple front ends. I am rewriting my back end to be more maintainable as the scope grows. For ...
3
votes
2answers
67 views

More efficient conversion of tab-formatted nested data structure to json

I have data that looks like the "Input" below and need to convert it into JSON. My solution works by parsing the text to find a level for each data point. Then I use a recursive structure to build a ...
5
votes
2answers
170 views

Good practice for client code to MVC WebApi service

I have written a very simple web service with MVC and WebApi. Now I'm working on the client code which will be a WPF application (and soon Windows 8 Store/Phone app). What I have done works, but I'm ...
2
votes
2answers
74 views

Filling modal from JSON (dynamically)

My Java app converts its modal object to JSON (using the GSON Library). This is just fine, but I have to get it back into a modal in PHP. Now I've created a modal (in my case it's, for example, ...
2
votes
2answers
166 views

Interacting with database in MVC

When using MVC 4 Razor (I am new to web development), I get concerned about my understanding of interactions between the database and the client. Much like all appilications these days, there is a lot ...
5
votes
1answer
103 views

JavaScript Weather App

I am pretty new to JavaScript, and put together a weather application. I'd like to get some feedback on improvements I could make to the code itself and also possible ways to speed up weather data ...
3
votes
2answers
102 views

HttpRequest.Json collection - like HttpRequest.Form

I'm looking for a code correctness and best practices review on the following. I created the following in order to prevent using the same code to convert serialized JSON to something more accessible ...
3
votes
1answer
86 views

Parsing Solr log files - version 2

This post is in reference to: Parsing Solr log files I re-wrote most of the code and split it up into a couple of classes. Currently, the class functionality is pretty limited, but I can see that I ...
2
votes
1answer
25 views

Munging data off WALS

I have created a script to munge data off this. ...
0
votes
2answers
140 views

Python UDP-server and JSON parser script

I am a python beginner. I wrote a script which should run on a raspberry PI as an UDP server. It is reading and writing to a serial device and has to process and forward JSON strings too. Because ...
2
votes
1answer
94 views

Refactoring a Instagram widget feed function

I've adapted a Instagram widget from this example so that it now appends 8 images to their respective IDs using a Instagram username. I want my widget implementation to be better and more efficient. ...
5
votes
2answers
392 views

Parsing JSON to a Map and Set structure

How do I make these line of codes more scala-ish (shorter?). I still get the Java feeling in it (which I want to stay away from). ...
2
votes
1answer
52 views

Clojure code for generating HAL JSON responses

I wanted to use hal in one of my personal Clojure projects, but unfortunately the only library I could find (halresource) was somewhat out of date when compared to the current specification. So, I ...
4
votes
1answer
107 views

Making an array editable by user

What I want to do: Let users add data to an array through an input field and add button. HTML: ...
6
votes
2answers
78 views

Clean and tidy Python code for dictionary look up and API interactions

I am new to programming and entirely self-taught. Below is a program I wrote to retrieve text content via an API and scan the text for important words. If the word is found URI is returned. The API ...
2
votes
1answer
33 views

Restructuring data received from JSON call

I'm making a JSON call and receiving data and inputting the data received into some HTML. However I don't think this is the best way to return the data. It's seems like a bit of a hack as I'm ...
1
vote
0answers
66 views

Generate HTML from JSON (most efficient way in jQuery)

I have to generate a lot of tables from different jsonfiles (up to 20 tables per page). Because it's a lot of data, I really want to keep loading speed in mind. I know it's better to use a non jQuery ...
5
votes
1answer
1k views

Better way to fetch JSON data from a server from iOS app

I have successfully coded a network request to fetch JSON data from our server. The remote function is written in ColdFusion. However, the code is quite lengthy and involved. I also noticed in the API ...
3
votes
2answers
106 views

IsoStorageManager

A manager for a speedy async saving objects to isolated storage, using serialization from Newtonsoft.Json. A project to play with is here. ...
2
votes
2answers
85 views

Is there a proper way to query ExpandoObject?

I am receiving the JSON from WebService and populating ExpandoObject from this one: ...
5
votes
1answer
272 views

Load JSON file into model using Javascript / jQuery (deferred, asynchronous)

As a beginner I am always determined to improve myself. I've got written the following Code using jQuery that is working fine. However, I am sure that there are cleaner ways for achieving the same. ...
3
votes
1answer
536 views

Scraping reviews from Google Play using JavaScript

What I'm trying to do: Get user input for Google Play App page. e.g. https://play.google.com/store/apps/details?id=jp.scn.android Scrape 100 reviews from Google Play App and organize them into an ...
4
votes
1answer
72 views

Refactor Ruby code from Hacker News API. Trouble parsing the JSON data

I made a command line Hacker News reader in Ruby that pulls the latest 10 stories from HN and allows the user to cycle through them or open them with Launchy. This was to play around with Ruby and ...
3
votes
3answers
88 views

Simplifying a web service method

I have the following method in a web service class. I'm a little unhappy about the big block of new JProperty(...) calls in the for loop. Is there a way to ...
4
votes
1answer
2k views

Web API 2 authentication with JWT

Please review my code for bearer token (JWT) authentication of Web Api 2 (Self Hosted using OWIN) Are there any security issues in the implementation? Quick overview: Token creation and validation ...
1
vote
2answers
965 views

Is this use of Newtonsoft.Json.JsonConvert.SerializeObject secure?

Like many ASP.NET developers, I use the Newtonsoft library to convert C# objects into JSON. Is this use of Newtonsoft.Json.JsonConvert.SerializeObject secure? Here ...
5
votes
1answer
55 views

JSON data from Twitter to Edgelist?

Following along another code review (Printing out JSON data from Twitter as a CSV?) I would like to submit a slightly adapted code for review. This code imports JSON data obtained from Twitter and ...
5
votes
1answer
222 views

Simplify C# Helper Class to change property of string when serializing for Json.Net

Is there any way to simplify the following C# helper class to numerate a string for Json.Net? ...
1
vote
2answers
105 views

How to handle JSON's undefined value in a better way?

I'm working on Google Book API to post a book's basic information. I notice that some of the books will always miss a value or two under volumeInfo, like this book ...
8
votes
2answers
240 views

Django API Implementation

I am building a backend to a mobile application that will be hosted on a Django site connected to a PostgreSQL database. I have never built anything to accomplish this before and this is my first go ...
4
votes
1answer
1k views

Concerned with Enums, JSON, and ASP.NET MVC

I am writing an application that uses ASP.NET MVC for its front end, and for the back end, it uses RavenDB to store data. This ...
13
votes
2answers
224 views

parcel: a JSON parsing library in C

I've created a JSON parsing library in C, and would like some feedback on it (feel free to submit a pull request on GitHub). Any and all suggestions are acceptable, but I would prefer if reviews were ...
2
votes
1answer
176 views

Return JSON array through PHP

Call from my index.php to function get_data($curr_date) goes from here ...
5
votes
4answers
113 views

Array of Objects or Array of arrays? [closed]

I build phone apps and I use JSON a lot in my APIs. The problem is sometimes I don't know how to format the JSON data. For example, an iOS UITableView takes ...
7
votes
1answer
117 views

Requesting Resources Until Exhaustion

When an API has a 'next' feature, I use the following pattern to obtain all the results: ...
2
votes
1answer
162 views

Listing with JSON or plain HTML

I have a website which has reviews about games. Right now, to list the advantages (+) and disadvantages (-) of that game, there's a textarea in the admin panel with a WYSIWYG editor with only ...
1
vote
0answers
65 views

How to indent a jQuery 2.0.3 $.ajax? [closed]

I use jQuery 2.0.3 and my IDE can't format ("auto-indent") this structure, but when I used JSPretty, I now have an indentation that I think is right. ...
11
votes
2answers
185 views

Setting up keyboard bindings using JSON (no reflection!)

I got a lot of good feedback on my other question. So I will take another swing at it, post my revisions, and hopefully get some more. First, the configuration hasn't changed. Here's the JSON file: ...
6
votes
1answer
76 views

Account-Creation form

How can I optimize the following PHP/JS code? It works like a charm but I think it is too long and I'm sure it could be optimized. If I have another form, I'll need to copy paste some lines from my ...
5
votes
1answer
55 views

Setting up keyboard bindings using JSON and reflection

My game uses configuration files in JSON format. One of them is used for setting up control bindings, and it looks like this: ...