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
10 views

Save a dictionary to csv [on hold]

I'm very new to python, so still trying to figure out how to do lots of things! How would i convert this into a .csv file? I need it saved into 2 columns with the headers "x" and "y". Any help would ...
3
votes
0answers
37 views

Merging multiple JSON files using Python

I have multiple (1000+) JSON files each of which contain a JSON array. I want to merge all these files into a single file. I came up with the following, which reads each of those files and creates a ...
0
votes
0answers
33 views

Building JSON array containing HTML

So, One of my companies developers wrote this. Not me. Alright, it was me. How can improve this puke? ...
1
vote
1answer
21 views

Swift extension: Dictionary<String, AnyObject> to JSON string for URL parameter

Here's a quick extension for [String: AnyObject] dictionaries in Swift. The output needs to be in the following format (order and spacing don't matter): ...
4
votes
2answers
53 views

Return existing values inside database

Here's a method inside my controller that reads the values of angle and point data from my database. Then it grabs the data and adds it to a new list and sends the JSON to the view. I can't simplify ...
5
votes
2answers
51 views

App for displaying pictures to like

I am making an app that shows some pictures and you can like each picture. I am sending a POST request from the Android device. In my backend I have a Python script that takes parameters category and ...
0
votes
0answers
20 views

Calculate discipline level from attendance record given a set of rules

I have written an attendance calculator that compares a set of rules against an employee's attendance record and determines what level of progressive discipline that employee is at (how much trouble ...
2
votes
1answer
53 views

Controller to list users

I think I put too much code in my controller that was supposed to go in the model. This is a part of my controller, I'm not gonna paste everything since there is a lot of code. ...
1
vote
1answer
28 views

Getting distinct array of objects

I would like to get a distinct array of objects. The code below is the first thing that came to mind. Do you see any room for improvements? ...
7
votes
1answer
64 views

Small console app to execute some remote scripts

I'm learning F# and functional programming, from a background in C# and imperative/OOP. I've ported a small, one-off console app from C# to F#. The port worked (the app behaves the same way), but I'd ...
0
votes
0answers
19 views

Jekyll plugin for creating CSV files

I recently created a gem for Jekyll plugin to create some CSV files. I put a little more effort into it and tried to make it something that others might be able to use. I'm a little lost on how to ...
2
votes
0answers
25 views

Song search app with dynamic tables

I decided to make a Ruby app to search for songs, it uses the tinysong API. Things got really cryptic and weird in the view, I managed to get dynamic tables that adjust to data length, but I feel like ...
2
votes
1answer
56 views

Empty an array on focusout - jQuery UI Autocomplete

Is it good to empty an array on focusout? ...
2
votes
1answer
57 views

Web API controller to get details of a travel plan or a leave request

My web API has 3 controllers for get, post and users CRUD. I named it as DetailsControllor, FormControllor and ...
0
votes
0answers
37 views

Rendering JSON array as a tree

This code is working fine for me, but I want to simplify it. Function parents is defining parents of the tree and children ...
3
votes
2answers
271 views

Data Persistence

I was wondering if I could get some feedback on the library I created to persist data online. JitterPushDemo.java ...
0
votes
0answers
34 views

Make knockoutjs model simpler and avoid full observable array refresh

The form creates / updates /deletes a category. The category is simple: ID and name properties in backend (Laravel) model. UI: Clicking on a category enables "edit mode": I need 2 things here: ...
8
votes
2answers
88 views

Reference implementation of HTML-to-JSON converter for PCG

I have opened a puzzle at Programming Puzzles and Code Golf. The question is not perceived well (yet) and one of the reasons is that no reference implementation is provided. To mitigate this ...
4
votes
2answers
56 views

Command line utility to output modified Markdown

What this command line utility does is to take a text file and update the content a bit before turning it into Markdown. For example, the first for loop searches all the straight quotes and replace ...
8
votes
3answers
358 views

Soundcloud to CSV File

This program connects to Soundcloud and turns the supplied username into a CSV file with the user's like list. The code accomplishes this although it looks rather messy and was wondering what I could ...
2
votes
0answers
89 views

PDF-to-JSON converter

I've created some methods to help me convert PDF to text and then text to a JSON object. I've never done this before and I'm using this exercise as a way to improve my knowledge of Ruby. The ...
13
votes
1answer
153 views

Parsing log files of HearthStone: Loading card data without external libraries for JSON

I'm still working on a parser that can parse log entries from a game called HearthStone, the overall idea is that it will read the log file live when the game is running, parses the log file and show ...
2
votes
0answers
27 views

JSON extraction

Given the code below, is there a better way to essentially create different native objects without changing the native constructor or the nativeList.json file? The only option I can see is adding a ...
2
votes
0answers
109 views

Get local Dropbox path with Delphi XE7

I've put together a function in Delphi XE7 which returns the Dropbox directory path on my machine, as this path can be customized by the user. This function currently works on my computer, but it ...
1
vote
0answers
29 views

Improving JavaScript processing of Ruby Regex

I have a basic webapp that basically serves the same purpose as Rubular.com, but for gsub. It runs some simple JavaScript, which POST's to a Sinatra app, which then updates page with the results. ...
1
vote
1answer
53 views

Python script to convert hierarchical JSON to LaTeX itemize

I have the following JSON: ...
10
votes
0answers
154 views

Optimizing performance of slow complicated article-sorting query

In short I have a bunch of articles (~100k) which shall be ranked ("mixed", hence "newsmix") based on their newsValue (how important they are, between 1 and 10) and newsLifetime (how long they stay ...
1
vote
1answer
49 views

JSON storage of data for a to-do list application

I am making a to-do list application in Python that will show tasks/subtasks/sub-sub-tasks in a tree view, but with higher-level clades of tasks grouped into blocks (e.g., Work block, Home block). So ...
3
votes
1answer
75 views

2 way communication Python socket

I'm trying to create a 2 way communication socket in python. The socket will listen for connections from the client until it gets the data formatted in string like this: 'PHONENUMBER|STATUS'. I will ...
5
votes
0answers
80 views

Serialization: Step 1 Json Parser

As nobody has provided input, I have updated the question. (The next one is coming soon) Coding to this interface: ...
3
votes
0answers
107 views

Web service for Android clients to store images

I wrote this code for Android server interaction. The way I built the client was an onSharePreference of strings includes photo encoded to a base64 ...
16
votes
2answers
257 views

API for looking up Japanese postal code

Most of my experience is in Python, Java and embedded C, and I need to learn Scala and Play for a new job. As an exercise, I decided to create a very simple API for looking up area by postal code, ...
3
votes
3answers
121 views

Converting click count data to JSON

I have an array filled with 5 other arrays that consists of arrays of 2 values (first a date then a count): ...
4
votes
1answer
101 views

Sublime Text 2 R Build System (source file, send selection to interactive session)

The following is the description of the R build system I am using (very happy) with Sublime Text 2 on linux (Crunchbang). With it, I am able to: to source the current file.R to an interactive R ...
2
votes
0answers
49 views

Assigning JSON object values to objects in a KnockoutJS setup

I am using this for in loop to loop through a JSON object and to assign the JSON object's value to my own object in a KnockoutJS setup. The JSON object looks like ...
2
votes
1answer
40 views
2
votes
2answers
239 views

Loading 40GB twitter JSON TAR file from archive.org and load into PostgreSQL

I wrote the script below to load data obtained from the twitter JSON archive on archive.org into a PostgreSQL database. I'm looking for optimizations in the code. It currently runs at ~1.7 seconds ...
2
votes
1answer
38 views

Displaying shows with videos

My method takes a long time to respond, so I'd like to make this method more efficient. I'd also like this method made with joins. ...
5
votes
1answer
1k views

Swift project using PHP web service

I was hoping for someone to review my current project, which was created in Swift and uses a PHP web service. I'm not worried about UI elements, as this is just a 'test' project, but I'm concerned ...
3
votes
1answer
531 views

Recursively parsing JSON response using GSON

I have a URL which I am executing it and it is returning the below string as a JSON response. I am using GSON to parse JSON. In the below JSON, "resourceId" ...
6
votes
2answers
76 views

File class and large constructor

I have some dispute with a colleague. I work with some REST-service, from which I get always same type data. ...
3
votes
2answers
139 views

Speed up loop through JSON

I have the following function that takes JSON and turns it into table rows: ...
3
votes
1answer
195 views

Loading and displaying JSON quickly in PhoneGap app

I have this tap event in an iOS app that I'm developing with PhoneGap. When I click on the left arrow, it finds the desired content and retrieves it from a JSON file. It then displays those results on ...
3
votes
3answers
292 views

WorkGroup Data Service with JSON / Web based API

I'm wondering if this code can be made more clear and fluent: ...
2
votes
1answer
41 views

Manipulate JSON data from the client with JavaScript

I am making an application in which the user has the ability to add, remove, and edit JSON data through DOM interaction. I have created a working JavaScript-only prototype that accepts certain ...
1
vote
1answer
1k views

Displaying data from JSON in a table

What do you think of my code? I know it is a little rough around the edges but as of two days ago I had no idea how to use jQuery or JavaScript. ...
1
vote
2answers
147 views

Deserialize JSON Strings Directly into Models?

I have Ruby models which are populated from the responses of API calls in the following way: JSON.parse converts the response to a ...
3
votes
2answers
1k views

Insert JSON data into rendered template after AJAX call

I have an already rendered template and I want to update it with some JSON data I obtain via AJAX. The template as it is before rendering looks like this (using ...
0
votes
1answer
366 views

Efficiently serialize big JSON using GSON without loading everything in memory?

Below is my JSON in which I have only three reportRecords just for demonstration purpose but in general sometimes we are getting pretty huge json, then it doesn't ...
4
votes
2answers
2k views

JSON conversion to single quotes

The JSON standard uses double quotes for key names and string values, such as the following: {"one":1,"two":"two"} However, the current project I am working on ...