Tagged Questions

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

1
vote
2answers
43 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
29 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
65 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
145 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 ...
4
votes
1answer
72 views

Unmarshaling dynamic JSON

I have JSON object response returned from the server which is similar to this one: ...
1
vote
0answers
19 views

Python Multiprocess Dictionary Selector [closed]

I am attempting to select devices via telnet based on a key I get from pinging the telnet device. Basically it selects to use only the devices with the given key. I am running into issues when a ...
2
votes
1answer
28 views

Filtering JSONArray by Branding & Modelling

I have a small function that takes in a list of JSON objects that has the format below. The function below that wants to see if the brand and model of car passed to it can be matched against the List ...
1
vote
0answers
25 views

AJAX/JSON based portfolio [closed]

This is a design portfolio page. On load, the JSON data is retrieved via ajax, and one of the keys is used to generate a list of '.project-links', however none of the projects are loaded by default. ...
4
votes
1answer
104 views

Using array values to create variables, if statements and highchart dataset

I am trying to make my script maintenance-free by replacing some "static" variables and labels with dynamic ones. The main function of my code is to extract data from a SharePoint-list which contains ...
1
vote
1answer
46 views

More maintainable API for wysihtml5 widget

For an HTML calendar with jQuery, I put in event listeners to enable jQuery drag-and-drop that reads and writes to persistence using HTTP get and post with JSON structures. Now I'd like to make the ...
8
votes
1answer
148 views

JSON C++14 library API/implementation

I'm creating a C++14 header-only JSON library for fun, learning experience and to use it in my personal projects. I'm looking for feedback on: Its API/interface: since I'm using modern C++, I want ...
2
votes
0answers
11 views

Compressing a blog into a preview using tumblr_api_read

Here is what I have currently working. I would like to make it look more aesthetically pleasing, so not finish words in mid word. Also not have the two previews be so much larger than the other. ...
3
votes
5answers
122 views

Turning JSON objects into custom NSObjects

Was advised to post this question here after posting to Stack Overflow. I'm pre-populating a UITableView app with data using a local JSON file. The JSON itself is very simple: ...
1
vote
0answers
22 views

Is this an acceptable way to map JSON objects to custom NSObjects? [duplicate]

I'm pre-populating a UITableView app with data using a local JSON file. The JSON itself is very simple: ...
5
votes
1answer
67 views

Python wrapper for official Hacker News API

Since Hacker News launched their official API, I started working on Python wrapper for it. API v0 is fairly simple, you send a GET request with hacker news story's ID or user id, it returns data in ...
10
votes
3answers
886 views

Displaying information about people from a JSON file

I'm working with Python 2.7.5 and I have written the following code: ...
6
votes
1answer
95 views

Dict of names and birth dates which prints with age at birthday of current year

As a beginner (Learn Python the Hard Way), I've set myself this exercise with classes and it works but looks very inelegant to me. I'm trying to write classes which could be re-used in other code. ...
2
votes
1answer
87 views

Steam API JSON Function JavaScript

Upon coming face to face with the mighty cross-origin request block, and needing to get a JSON file from an external source, I decided to use the Yahoo Query Language in order to achieve this. I'm ...
-1
votes
2answers
65 views
4
votes
1answer
91 views

Reading and Parsing JSON from a Game Server

This is my naive (but currently working) attempt at reading JSON commands from a Java game server in Objective-C. I am afraid I might be doing something wrong, so hopefully this question will be a ...
3
votes
1answer
65 views

Dirty XML-to-JSON parser

I have that XML-to-JSON function based on ElementTree. It looks very simple but until now it does what it's supposed to do: give a JSON description of the ...
3
votes
2answers
91 views

SQL result to JSON

I am trying to return a JSON object to an Ajax call. Is this the best way to build a JSON object with PHP JSON encode? ...
2
votes
2answers
145 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
62 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
101 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
118 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
69 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
89 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 ...
3
votes
1answer
22 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
854 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
88 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
432 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
86 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
261 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
85 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
481 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
313 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
194 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
104 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
289 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
124 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
532 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
71 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
120 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
97 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
38 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
138 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
3k 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 ...
4
votes
2answers
117 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. ...