Questions tagged [json]
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.
62
questions
33
votes
1
answer
7k
views
JSON Serializer
Carrying on from:
Yet another C++ Json Parser
Yet another C++ Json Parser (Recursive)
All the code is available from git hub: ThorsSerializer but only reviewing a small section here.
The idea is ...
15
votes
4
answers
347
views
From Q to compiler in less than 30 seconds
(See the newer version here: CodeReview question markdown downloader)
As an adjunct to From new Q to compiler in 30 seconds, I've created a Python script to automatically download the markdown from ...
49
votes
1
answer
7k
views
Yet another C++ JSON parser
This is a framework for a JSON parser I put together last night.
Any comments appreciated.
JsonLexer.l: Breaks the input into lexemes
JsonParser.y: Understands the language syntax
JsonParser.h: ...
7
votes
0
answers
662
views
Chaining JSON transformations with visitors
I have currently two use-cases that require JSON transformations before it can be deserialized.
The first use-case requires changing the custom short type property name from ...
5
votes
0
answers
74
views
JSON Test Harness: Part 1
Part 2: JSON Test Harness: Part 2
Part 3: JSON Test Harness: Part 3
Part 4: JSON Test Harness: Part 4
Time to review some test harness code I have written.
https://github.com/Loki-Astari/...
5
votes
0
answers
45
views
JSON Test Harness: Part 2
Part 1: JSON Test Harness: Part 1
Part 3: JSON Test Harness: Part 3
Part 4: JSON Test Harness: Part 4
Time to review some test harness code I have written.
https://github.com/Loki-Astari/...
4
votes
0
answers
49
views
JSON Test Harness: Part 4
Part 1: JSON Test Harness: Part 1
Part 2: JSON Test Harness: Part 2
Part 3: JSON Test Harness: Part 3
Time to review some test harness code I have written.
https://github.com/Loki-Astari/...
3
votes
0
answers
33
views
JSON Test Harness: Part 3
Part 1: JSON Test Harness: Part 1
Part 2: JSON Test Harness: Part 2
Part 4: JSON Test Harness: Part 4
Time to review some test harness code I have written.
https://github.com/Loki-Astari/...
24
votes
2
answers
2k
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 ...
12
votes
2
answers
4k
views
More efficient way to retrieve data from JSON
I am using the jsmn JSON parser (source code) to get extract data from a JSON string. jsmn stores the data in tokens that just point to the token boundaries in the JSON string instead of copying the ...
11
votes
1
answer
515
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:
...
8
votes
1
answer
285
views
Post json using http and verify whether all actions completed successfully or not
I am working on a project where I need to work with http apis and call them using Python language. Below is what I need to do:
Take few input parameters like - <...
5
votes
2
answers
152
views
Tracking Containers in a Train Station
This is a time line for control over the events of some containers in a train station.
It gets all the data to build the time line by getting a JSON from a database via REST service. The app resets ...
5
votes
1
answer
278
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:
...
4
votes
1
answer
3k
views
Yet another C++ Json Parser (Recursive)
Following on from this request Yet another C++ Json Parser
A friend pointed out that he though a recursive decent parser would be more efficient.
Before I agree I want to test it so I wrote it for ...
2
votes
1
answer
2k
views
Extract data from large JSON and find frequency of contiguous sub lists
I have been writing some code (see component parts here and here) that:
Takes a very large JSON (15GB gzipped, ~10million records)
Extracts the relevant parts of the JSON into a list of lists
Creates ...
0
votes
2
answers
2k
views
JSON string parsing
I need to parse a simple JSON string (flat JSON, no hierarchy) for keys and values, and there is a system constraint that I cannot use any built-in JSON library and can only read a string once due to ...
20
votes
4
answers
2k
views
CodeReview question markdown downloader
This is an update to my earlier question From Q to compiler in less than 30 seconds.
As with that version, this Python script automatically downloads the markdown from any question on Code Review and ...
16
votes
2
answers
16k
views
Java JSON parsing with the Nashorn API
Some time ago I found a website about the Java Nashorn API which allows you to run JavaScript from Java code. I thought about creating a JSON parser in pure Java (without external libraries) which ...
12
votes
2
answers
346
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:
<...
12
votes
3
answers
3k
views
Prettify JSON class
It's not much, but I tried employing some of the things I learned yet never really got to use, since that kind of code isn't really needed where I work (for the most part). I tried making it as much C+...
11
votes
3
answers
3k
views
Fetch, Parse, and Save JSON
I've written a program in Java that will fetch JSON information from a service through their API and save it. As I'm new to Java, I want my code looking clean as possible and to understand the ...
10
votes
3
answers
951
views
Displaying information about people from a JSON file
I'm working with Python 2.7.5 and I have written the following code:
...
9
votes
2
answers
252
views
JSON4 parser in Typescript
Context
I may have accidentally gotten a little sidetracked during homeschooling, and wrote a JSON4 parser in Typescript during the down-time. This project started as an idea that I got while ...
8
votes
3
answers
3k
views
Catching multiple types of exceptions when writing JSON
I have a class which throws a lot of exceptions:
...
7
votes
2
answers
538
views
Using an API to obtain JSON data and get the date string and determine if data is stale
This is a nagios check that will use an API URL, get JSON data, flatten the data into a usable perl hash, and ultimately obtain a date string. Once the date is obtained, it should recognize the ...
6
votes
0
answers
1k
views
Recursive conversion from ExpandoObject to Dictionary<string, object> #2
Because my original question was lacking many details, I have been advised to ask a new question.
I will repeat the important parts of the original question and add examples etc to hopefully make it ...
6
votes
1
answer
240
views
Work order spatial query (Part 1)
Part 1: General Cleanup
(Edit: Part 2 is here.)
I have a script in a Work Order Management System (Maximo) that performs a spatial query.
Details:
Takes the X&Y coordinates of a work order in ...
6
votes
1
answer
1k
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. I'...
6
votes
2
answers
7k
views
Yet another JSON parser and serializer for Qt, but with additional features
I wrote QJson, a utility class in/for Qt, I need you to take a look at. It is both a JSON parser and serializer, but with extended functionality (going beyond the ...
5
votes
1
answer
186
views
Arabic language lesson program Part 2
This is the second time I am asking for a review of this code (first time can be found here: Arabic language lesson program). The goal of the program hasn't changed - to house Arabic language lessons ...
5
votes
2
answers
727
views
Asynchronous HTTP JSON request
For asynchronous requests, I use Alamofire.
I have created one method for requesting async data.
...
5
votes
1
answer
730
views
Fetch and Save Weather Data as JSON
This is part 2 to Fetch, Parse, and Save JSON. As the code evolved, I wanted to post the program with changes for review again.
The objective of the program is to fetch JSON information from a ...
4
votes
2
answers
185
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.
...
4
votes
2
answers
3k
views
Download entire localStorage as file
I would like to download the entire contents from localStorage to a json file (in a "clear" formatting).
I've tried this and it works perfectly. However, ...
4
votes
1
answer
2k
views
Converting JSON to CSV using powershell
I have a very large JSON Lines File with 4.000.000 Rows, and I need to convert several events from every row. The resulted CSV File contains 15.000.000 rows. How can I optimize this script?
I'm using ...
4
votes
2
answers
310
views
Data Persistence
I was wondering if I could get some feedback on the library I created to persist data online.
JitterPushDemo.java
...
4
votes
2
answers
335
views
PHP script that writes a JSON file with iextrading API data
iextrading has two APIs (v1, v2) which provide financial market data. Following script records a JSON file with their equity information (using a CRON job).
Would you be kind and review it for any ...
4
votes
2
answers
618
views
Slurp JSON trading cards to valid HTML
For Cardshifter TCG we pretty frequently update our list of available cards, so I tried to think of a way to make it easy to transform an exported JSON file containing all the cards into a decent HTML ...
4
votes
2
answers
1k
views
Generate thousands of JSON documents in Go
I recently decided to try to learn the Go language. In order to do this, I wrote a small program which parses a JSON configuration file, and generates N bson documents according to its properties.
For ...
4
votes
1
answer
625
views
Fetching specific foreign exchange rates from fixer using curl and jsconcpp in C++
I am trying to create my own algorithmic trading system using C++. I have searched the web for a nice tutorial for such systems and I didn't find any. Then I started to learn about ...
4
votes
1
answer
987
views
Scrape a reddit post submission for comments and save comments to JSON file
Edit: For a revision to this code according to the comments, see here: "here."
In regards to the code involving shortlinks and ...
4
votes
1
answer
238
views
Perl Nagios plugin to query an API, obtain date from JSON, and determine if the date is within thresholds
This is an update of Using an API to obtain JSON data and get the date string and determine if data is stale
This is a Nagios check that will use an API URL, get JSON data, flatten the data into a ...
3
votes
2
answers
184
views
Validating a CSV list of contacts and convert it to JSON
I've written a class that takes a file, validates the formatting of the lines from an input file and writes the set of valid lines to an output file. Each line of the file should have a first name, ...
3
votes
1
answer
421
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 ...
3
votes
2
answers
399
views
Parsing JSON in one go
I need to parse a simple JSON string (flat JSON, no hierarchy) for keys and values, and there is a system constraint that I cannot use any built-in JSON library and can only read a string once due to ...
3
votes
2
answers
89
views
Saving and reading the last successful execution as a json-file
I've got some tools that run perdiodically like weekly or monthly that don't support any retry mechanism. In order to increase their chance to succeed in case a database wasn't reachable or some other ...
3
votes
1
answer
1k
views
JSON serialization helper class
I wrote this class to one-line all my JSON serialization, and I'm curious of any input on it.
It's only responsible for serializing/deserializing any type to/from JSON.
The comments and code are ...
3
votes
1
answer
779
views
Script to store, search, and delete IPFS data with description in JSON file
Here is the script that I would like reviewed for the following:
Best practices and design pattern usage
Correctness in unanticipated cases
Better dictionary access
The script is made to store (IPFS)...
2
votes
2
answers
1k
views
Infinite scroll for currency list
I made infinite scroll for a currency (in the code below: valute) list. The currency list is fetched via an AJAX-request from a remote server. After it starts the script displays 10 records. After the ...