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.
2
votes
1answer
30 views
Calling TWITCH API and displaying online/offline users of a channel
I've got this working almost to where I want it. The part I can't get right may be due to the programming so I'd like to get a review.
I'm making JSON calls to ...
-1
votes
0answers
18 views
Annotating a JSON extending to JSON-LD
I am relatively new to extending regular JSON to JSON-LD. I am currently working on a project where our Mongo collections will be available as open data. At the same time I want to add semantic ...
3
votes
0answers
23 views
xkcd comics data provider
Please help me improving this code(golang), thanks!
Why I need built a API for xkcd
Can't get the data provided by xkcd directly in front-end(CORS).
So we can package the data to 10 comics per ...
2
votes
2answers
38 views
Retrieve data from json file and avoid HTML/JS tight coupling
I am retrieving data from a json object and even though code works I am not sure if I am following best practices.
In particular some of the objects seems too deep (like value.metadata.connections....
0
votes
0answers
11 views
Spark Code for doing SQL Operations on a/ multiple JSON files
Input is one or many json files to run a query and print the result.
I have tried both Collect and saveAsTextFile but both are slow and would appreciate suggestions to help speed things up.
Here is ...
-2
votes
0answers
43 views
Evaluation of SOAP and REST based code for Expressitivity
Currently I am doing a project for my Master's thesis and have to evaluate web service standards for Web of Things applications(Real-time Patient Monitoring System).
Below is code I have written in ...
0
votes
1answer
55 views
Pretify JSON class -followup
This is a follow up to this question. This is an improved version in accordance to comments, suggestions and reviews.
Is the namespace implementation proper? is the code readable? I didn't want to ...
8
votes
3answers
1k 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+...
2
votes
1answer
31 views
Create JSON file from WordPress ACF options
I am using a WordPress multisite network and want to pull information from options pages in Advanced Custom Fields to create a json file. I currently have this code running whenever an options field ...
2
votes
1answer
22 views
An interesting use of the reduce function to convert tab-delimited data into JSON
I am learning functional programming in JavaScript. This is some code from a video tutorial by funfunfunction. I am particularly concerned about the way the existence of the customer key is checked in ...
3
votes
1answer
58 views
Converting embedded JSON into flat table
I am new Python user, who decided to use Python to create simple application that allows for converting json files into flat table and saving the output in cvs format. I was wondering if you could ...
6
votes
1answer
68 views
Excel VBA to parse JSON out of Google Maps API
Some code that I wrote and broke into 5 separate questions on stack overflow. Some guy wanted to query Google Maps receive some JSON and then for each result found within that JSON do another query. ...
4
votes
2answers
160 views
Script to print weather report from OpenWeatherMap API
This script prints the weather (fetching the information from a public API).
If anyone could review my code and answer my question about code structure and how should I code in the right way, I ...
1
vote
1answer
29 views
Foldify - A Python Folder Tree Manager Tool
The goal was to create a tool to help manage folders structures, and allow me to create templates of this folders and store them as a JSON template.
The following functionalities have been implemented:...
9
votes
2answers
679 views
JSON Parsing in Bash
I have a json file which needs to be restructured.
The following is the code.
...
1
vote
1answer
34 views
4
votes
2answers
153 views
ToDoApp with persistence (using JSON)
This is a simple ToDoApp with a CLI that is made useful by adding persistence. A shout out to @Phrancis and @syb0rg for guiding this little project to where it is now.
The structure is rather simple. ...
0
votes
1answer
33 views
Condense JSON for bandwidth efficiency
JSON is quickly becoming the formatting standard of choice for quick, convenient, and reliable machine to machine communications. It is flexible and widely supported but it has some drawbacks when it ...
0
votes
0answers
21 views
0
votes
0answers
30 views
Three functions to make a JSON array
Currently I'm using these three functions, that in the end produces a JSON array. I went this way so that I could fetch data from a specific table. But now it just seems bloated and poorly written, ...
1
vote
2answers
53 views
Grab photos from Flickr
I wrote the following code for a coding challenge I was given and it received the following criticism: it was quite a beginner attempt using Angular.
...
3
votes
1answer
56 views
Generating jQuery mobile “pages” dynamically
I'm doing a college assignment with jQuery Mobile and JSON. Best practice with jQuery mobile is my main concern.
My html starts off with a main 'page' (data-role="page") inside a div with id="all-...
0
votes
0answers
18 views
Flattened Data Model and noSQL data structure
I am currently building a small application using a service which requires and advocates the use of a "flattened" data model (the service is Firebase).
As I had no experience with data models before, ...
2
votes
2answers
69 views
Program to edit an address book stored as a JSON file
I was told to come here from Stack Overflow.
I'm trying my hand at an address book and the goal is for it to have a bit more of error prevention, for instance for the key "phone" to have 10 digits, ...
0
votes
1answer
56 views
JSON Writer (PHP)
I have written a simple PHP Script that takes $_POST input and uses it to add data to a .json file. Given the security flaws in ...
0
votes
2answers
85 views
Currency converter in Python 2.7
I'm a beginner and it is my first project in Python 2.7.
My goal is writing a script that I can run with two or three arguments.
If run with two arguments like ...
5
votes
2answers
104 views
Adding an item to database + JSON
Is this code good? Or is it the noobiest PHP you've ever seen?
...
1
vote
0answers
19 views
3
votes
1answer
655 views
Wrapper for a transfer transaction API
I'm looking for any kind of advice, like when or where to do exception handling, the overall library structure/layout, usage of classes/partial classes, code efficiency, naming conventions, and so on ...
2
votes
2answers
62 views
Generated serialization code
CGbR project
I am currently working on a project that generates code from classes. The idea is to achieve maximum performance by replacing reflection use cases with fast, generated code.
Current ...
1
vote
1answer
67 views
Telegram - GetUpdates Process
My code fetches telegrams from a server periodically in the background. The server API is documented here. What do you think of the way I do multithreading by handling my ...
0
votes
1answer
55 views
4
votes
1answer
29 views
Invoking API calls with parameters specified using JSON
I have an instance of a Java class that I need to call some functions on, using the API exposed by another party. For each call, I need to both check for thrown exceptions, and check the value of the ...
1
vote
0answers
44 views
Transforming a parts catalog into a different data structure
The entire purpose of this code is to arrange the data that was dumped into CommRef_ into the required structure of ResObj.
The ...
0
votes
1answer
47 views
Merging JSON objects with common values
I am trying to merge JSON objects which have common values.
This is the original JSON:
...
0
votes
1answer
144 views
Wikipedia search using the JSON API
I ask to you. What I could do better in my code or logic?
This my example on Codepen -> Wikipedia Search
...
2
votes
1answer
45 views
Regrouping JSON object
I wrote a JavaScript source which regrouping by new key i.e. following JSON to the other:
...
1
vote
1answer
63 views
Twitch client that notifies me when a followed streamer comes online
I've been writing code for a little while but I'm a little slapdash. I'd like to get better so I've been having a glance at best practices, other peoples code and reading a whole lot. I'd appreciate ...
10
votes
3answers
67 views
From Q to compiler in less than 30 seconds
As an adjunct to From new Q to compiler in 30 seconds, I've created a Python script to automatically download the markdown from any question on Code Review and save it to a local file using Unix-style ...
1
vote
1answer
51 views
0
votes
1answer
40 views
Collect several API call results
Want to brush up my rusty web dev skills. I want to call the twitch API for several channels and eventually call a callback function when all results are in without using a sync call.
I didn't work ...
0
votes
0answers
197 views
Loading autocomplete text view adapter dynamically using async task in Android
I am working on an app in which I need to get destination list from server and set it in autocomplete text view. I am using text watcher and on its onTextChanged event I am fetching destinations data ...
5
votes
1answer
94 views
Serializing (and deserializing) basic mesh using JSON.net
In order to improve my c# (which is fairly basic at best) I decided to try to serialize a simple mesh to a file using the JSON.net library.
Simple mesh in this case means an array of vertices and a ...
4
votes
1answer
180 views
Parsing JSON using jsoncpp
I left questions in the comments strategically, since I think it's easier to answer questions this way.
Basically what my small class does is abstracts away functionality that was originally in a ...
1
vote
1answer
149 views
Parsing JSON in one go using state machine solution
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 ...
2
votes
0answers
39 views
Excel-to-JSON parser 2
After first code review I have fixed the found issues. Could you please review my new refactored application?
Main class (entry point)
...
1
vote
1answer
105 views
Excel-to-JSON parser
I just wanted to build a simple converter from an XLS Excel file to JSON. I have predefined JSON format. All fields except of two - are just simple mapping from Excel to JSON. The two fields have a ...
3
votes
1answer
176 views
Newtonsoft Json helper class
I've written the following helper class to help serializing objects to and from Json.
I would appreciate some feed back on the style of the class.
...
3
votes
1answer
69 views
Angular JSON weather app
I'm pretty new to Angular. I wrote a weather app and need my code reviewed. I especially need help on best practices for handling edge cases on the response from the JSON endpoint.
Here's the HTML:
<...
5
votes
2answers
74 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 ...