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
0answers
18 views

json list dropdown selector for car shop [on hold]

I'm trying to do a listdown selector for choose a car model by the user of my shop. but not I access the models of the second trademark. Specifically do not work from the Audi A3 model. I don't know ...
3
votes
1answer
63 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 ...
0
votes
0answers
23 views

Converting JSON properties to numbers when serializing using Json.net and C# [closed]

I want to output the following example data in JSON: {"source_id":"1234","contacts":["15":"020 8111 1111"]} I've tried using the following code to achieve this using Json.net: ...
4
votes
1answer
48 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
73 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 ...
3
votes
0answers
87 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
81 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
34 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
111 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
58 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
204 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
139 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 ...
11
votes
2answers
122 views

A JSON parsing library in C

I've created a JSON parsing library in C, and would like some feedback on it. Any and all suggestions are acceptable, but I would prefer if reviews were focused on making this more efficient. My ...
2
votes
1answer
59 views

Return JSON array through PHP

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

Array of Objects or Array of arrays?

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
110 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
117 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
35 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. ...
10
votes
2answers
157 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
71 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
50 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: ...
-3
votes
1answer
54 views

Explain die() in PHP [closed]

die(json_encode($response -> RequestCallbackResult ? Vein::inst()->getWPPermalink(Vein::inst()->get('dialer_success_redirect')) : false)); What does ...
19
votes
1answer
321 views

Random clothes generator

UPDATED, original code can be found here. Also, my main goal is to not only improve the style of my coding, but also to improve the logic in finding random combinations. As of now it seems way too ...
3
votes
2answers
66 views

How can this <ul> be set up to maximize inheritance if additional classes will be passed in from a JSON file?

Objective Currently I have the flags hardcoded. But want to optimize my code for production. So I am wondering if I have this code done clean enough to leverage CSS inheritance while maintaining ...
6
votes
1answer
42 views

Loop through JSON and create prefab in Unity3D

I am creating an app in Unity3D and it is my first time coding in C#. I use the following code to parse a JSON file hosted on my server and use the information to render prefabs within my scene: ...
5
votes
1answer
64 views

Dynamic toggle system

I'm new to jQuery/JSON and I've build an dynamic toggle system. It work fine, but I'm not sure about my code and I want a better way of building this. Could you please see my code and give ...
4
votes
2answers
56 views

How clean is this mustache template for a listing page?

This was our old site that I am redesigning. Someone else hardcoded with inline CSS and javascript in tables. I wanted to make it dynamic, so I added Mustache and made this template: ...
3
votes
2answers
58 views

Find end of $.each() loop

I need to find the end of a loop or the length of the object. Some context on the code: I obtain the txt var from the DOM (that's the only way I've got by now and ...
1
vote
0answers
65 views

Webhook Structuring

I am building a Webhook model so users can receive data from a messaging app. I have never created such a system before, and I'd like to get some feedback on my attempt. ...
3
votes
3answers
76 views

Creating rows from JSON data

I am getting data from JSON and then create rows of it: ...
2
votes
1answer
93 views

How to find the unique values from the JSON file?

I have JSON files of size data_large(150.1mb). The content inside the file is of type [{"score": 68},{"score": 78}]. I need to ...
3
votes
1answer
79 views

Travel Advice class

I have never really had to use json.net until now, so I'm very rusty at it. For that reason, I would appreciate it if someone could have a look over my code and let me know if the way I have done it ...
0
votes
1answer
72 views

Android export browser history as JSON

I wrote a simple android app to export the browsers history as JSON, but I do not know if the resulting JSON is a format that the user will easily be able to parse and use. Is there any way that i ...
8
votes
1answer
112 views

“Game” Engine Requirements System

I am/have been building a game for a long time now. The game is a web browser based system, and data is stored using JSON stored in ...
12
votes
1answer
214 views

Gotta catch 'em all!

This week's challenge is essentially about fetching Json data from the Web, and deserializing it into objects. I don't have much time to devote to this one, so what I have is very basic: it displays ...
6
votes
1answer
174 views

Populate views in Android application

I wrote these classes and I would like to know if this is a correct way. I created a new Project with Blank activity and "Scrollable Tabs + Swipe" as Navigation type. My main activity: ...
2
votes
1answer
338 views

Converting entire table to JSON data. Is there a better way?

Building a 'card' database: I'm simply learning to take input data and store to database. Incorporating JSON, PDO, SQL, and enforcing my general coding skills through PHP, hopefully. ...
3
votes
1answer
77 views

Make my inclusion of PubNub in a Drupal Module more Drupal friendly/compliant

I have created a Drupal 6 Module that sends messages through PubNub when the user updates information about a Node. I have a separate app that, when launched, calls my Drupal site and receives a JSON ...
1
vote
1answer
305 views

Node.js DynamoDB callback

I am writing an API which gets results from a DynamoDB table and puts the JSON back into the browser. The code below works and returns the desired results. However, after reading about async and ...
6
votes
1answer
205 views

Elegant way of writing JSON parsing function using the Jansson library

I'm making a server in C that needs to parse JSON that follows oBIX protocol and I'm using the Jansson library for this. I've been programming in high level languages such as Java and C# for my entire ...
1
vote
1answer
126 views

Feedback on a small PHP function that generates JSON data

I wrote a PHP function that generates JSON data to populate a line graph. Through jQuery, my code uses a GET request to the PHP script to fetch the JSON data. An example of the JSON data is as ...
0
votes
0answers
79 views

Please review this import method for importing JSON to my Database in Rails

I have this large method to import data to my Rails database, is there any solution to make this code more DRY or a bit shorter? Should I leave it in the match Model or should I put it into it's own ...
2
votes
1answer
51 views

A C# class to check if one JSON tree (de-serialised as ExpandoObject / Array etc) contains another

I wrote this partly as a learning exercise in TDD. Could I please have feedback on both how to improve the quality of the code and the completeness of the tests? I used LinqPad as my IDE for this, ...
1
vote
3answers
175 views

1000+ of JSON objects in my case

I try to make a data of 1000 objects (incress in the feature) My JSON look like... ...
3
votes
0answers
328 views

Recursive JSON walk in Python [closed]

I wrote this JSON walker to help with moving objects around while updating Legacy JSONs to match a new schema. Please let me know how I could further optimize it, or more importantly, make it easier ...
0
votes
2answers
120 views

More Efficient Javascript indexOf query

There is an e-commerce site that I'm working on that has thousands of pages in it (mostly product pages). I've got some jQuery that I'm running on about 1300 of these products. Only specific products ...
0
votes
1answer
741 views

Sending form input to URL and retrieving JSON response [closed]

I am trying to take the form input, send its values to this URL, and retrieve the JSON response. Should this code work? I'm fairly new to this stuff, so my apologies if things are not quite right. ...
2
votes
1answer
188 views
3
votes
1answer
434 views

Parsing JSON from file in Java [closed]

This is a quick question. I am reading a mass amount of JSON from a variety of text files. The JSONs are tweets, in this format: ...
7
votes
1answer
164 views

Review a Python module i18n

To start, I am a developer Perl and Python. I am passionate and I love to write code. I discovered this site through stackoverflow and I think it's great. I love the code review, peer programming, ...