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.

Filter by
Sorted by
Tagged with
1
vote
0answers
17 views

Generating packaging slips with Node

I was tasked with writing a script, in any language, to generate packaging slips. These slips would be sent to our printer and printed. The scripts functions are as followed: Read in data from ...
2
votes
1answer
45 views

Golang REST API that CRUDS in-memory object

Hey everyone I have a very simple go REST API that is running CRUD operations on an in-memory object. I would love some feedback on how I can refactor this code, and how/if I should break this up into ...
4
votes
1answer
24 views

Time Tracker Project

I am working on a little python project to track how much time I am spending coding and doing things outdoors. Coding Subtracts and outdoors stuff adds. My code is looking pretty bad. Any suggestions ...
1
vote
0answers
24 views

OCaml backend for REST API and JSON data

I want to create a backend for a simple REST API in OCaml. For this I use the libs httpaf and yojson. I have something that works but I would like some reviews. Here is the structure of my little ...
18
votes
4answers
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 ...
2
votes
0answers
57 views

GraphQL Schema for a Social Network [closed]

I am learning about GraphQL so I decided to make a schema for some sort of social network. Please let me know if there are any best practices I should follow based on my schema below. ...
6
votes
2answers
141 views

Improving a JSON parser for C++

I wrote a JSON parser for C++. It is not particularly fast, efficient or elegant. I'd like to change that and primarily I'd like the code to be more elegant. How do I improve it and get rid of all the ...
6
votes
1answer
113 views

Recursive component JSON configuration builder

My goal here is to make data driven nested forms in React. I've created a function that points to a form configuration JSON, which can contain both components and references to other configuration ...
2
votes
1answer
81 views

Javascript map/filter/reduce over facebook messenger data

Context: I am making a website that allows people to upload their Facebook Messenger data, and see data visualizations for conversations. It is a React front-end, and a nodejs back-end. It doesn't ...
2
votes
1answer
124 views

Strictly typed JSON representation

I would like to be specific in parameter types or write something like this: Test test = (Json<Test>)"{\"age\": 46}"; Where: ...
1
vote
1answer
61 views

Reduce the execution time utilizing two apis

I am new to python. I have been given a task to verify the data from 2 apis which give similar data but in different format i.e. Json and XML. I have written the code but it is taking too much time to ...
2
votes
1answer
47 views

Import/Export data from/to json using python

I developed a code in python that: add name, age and Id information for each person, search a person by name, if it exists then display a message "Found" and fill "age" and "Id" with the ...
1
vote
1answer
49 views

Don't include root directory in HTML tree

I've written a function to create an HTML tree from JSON. ...
0
votes
0answers
33 views

Code with Java REST API and Json Objects (Gson library)

I need to make a POST call with Java to a REST Service. My code works fine, I am just writing in order to ask if there are better ways to do this, or if someone could refactor my code and make it more ...
4
votes
0answers
27 views

Thoughts about a json2clos decoding using cl-json

Coming from this question https://stackoverflow.com/questions/58131614/how-to-convert-json-string-into-complex-clos-object-using-cl-json-library I've finally come up with the following solution. I ...
2
votes
1answer
72 views

Send excel data to Kafka

I would like some one to review my code and let me know the feedback. Each Kafka Message is like as follows [{guid=id.Value1, timestamp=1386394980000, booleanValue=null, longValue=null, floatValue=...
1
vote
1answer
36 views

Display name and email fetched using JSON API when hovering

I'm learning AJAX JSON. I'm just testing how to pull the data. The idea is, when hovering over the number, it pulls the data and show the content for name and email. Number 1 is to show name and ...
3
votes
1answer
53 views

JSON to CSS in JavaScript

I'm working on a JSON to CSS converter in NodeJS, which takes a .json file and generates a .css file with its utility classes from it. .json example ...
3
votes
2answers
107 views

Fetching counties and localities using JSON API calls

I'm using the below code to call different methods from an API: ...
7
votes
2answers
91 views

Java command-line API client to fetch Bitcoin exchange rates

I am building a simple Java command-line application. And I want to know the best practice and make my code clean. Can anybody suggest to me how many different classes I can make and what more method ...
2
votes
1answer
89 views

Populate an ArrayList of different instances of a class

First of all, here is an overview of my application. I want to create a multiple-choice app, on android, using data stored on a remote MySQL database. The DB has 100 questions that will appear in ...
7
votes
1answer
84 views

Minimal JSON Parser

Motivation: Partially for fun / learning, but also so I can roll out a custom JSON-like file format for a fighting game I am writing. There are two caveats: you cannot have repeated keys (requires <...
0
votes
0answers
45 views

Creating a cson generator in python

I need to generate valid CSON representation of Python objects for a project; I still didn't make a loader because for this project I only need to export, not load. CSON is similar to JSON but with ...
2
votes
0answers
109 views

Parse DOM Tree in C++ [closed]

Problem I need to read custom text input of a sample document object model (DOM) represented in a json format from a file and store it in a struct I've defined as ...
7
votes
1answer
58 views

Forward values from JSON file as class attributes

I have a settings file, which is loaded in once and takes the values from the settings json file and uses them as the attribute values. I was thinking of using the ...
1
vote
1answer
39 views

Python nested json parsing and splitting the values

I am trying to split and assign the url's to the variable, I am getting the desired result but I know there is a way where I can improvise the current code. JSON FILE ...
2
votes
0answers
74 views

Bash bitcoin blockchain explorer

I wrote a little bash script that displays the transaction info in json: ...
1
vote
1answer
55 views

Work order spatial query (Part 2)

Part 2: Error Handling (and anything else that can be improved) (Part 1 focused on general cleanup.) I received this comment in an unrelated post (thanks @Milton): ...Since it is obvious you are ...
5
votes
0answers
48 views

JS deep merging of objects- removing empty keys

I've written a helper for combining objects (deep merge). It works, and is flexible to add options (like uniq and replace). ...
6
votes
1answer
113 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 ...
3
votes
0answers
122 views

JSON to CSV in python using json.loads and json_normalize

I am trying to convert a JSON file to CSV format using Python. I am using the JSON.loads() method and then using json_normalize()...
3
votes
1answer
72 views

“Real world” JSON transformation using Node.js

Background I transformed a non-trivial JSON response that uses arrays into a nested object eliminating some of the original properties inserting a new summary property that is a unique list of ...
2
votes
0answers
78 views

Updating UI in Retrofit onResponse

I have an Android project that queries the BART train API. I was curious if updating the UI inside the Retrofit onResponse method is correct or if there is a better way. Below is my code. Also, here ...
1
vote
1answer
59 views

Kotlin Android request client

As part of an android app, I've written a simple wrapper that makes requests to an api and fetches stuff. ...
4
votes
1answer
55 views

Paginating API with “next” Pythonically

I'm wondering if there's a more Pythonic way to keep paginating an API endpoint until there's no next key in the response. The thing that bothers me the most is the ...
2
votes
0answers
22 views

Recuperate user's details into fake JSON server

This is the 'details.ts' which define the user's details that I want to recuperate in a JSON (user's role, logintime, duration). ...
1
vote
1answer
50 views

HTTP status monitoring

I am fairly new to programming. I am writing a script which gets URLs and parameters through a config and makes http requests to check status, finally push a json string to Open-falcon server. I am ...
3
votes
1answer
35 views

Get list of new questions from Stack Overflow

I would like to write a little pet project using Clojure to study it, something like Stack Overflow client. Here is a my first code to get list of new questions from site. I am in the very beginning ...
4
votes
1answer
78 views

Pivotting SQL Table Response to JSON in JavaScript

Issue Our API returns two formats JSON and this SQL table format. I'm not sure what it is truly called so I'll give a few examples below. Like all API responses, it can be a list or a single response ...
2
votes
1answer
92 views

Create Node tree from list of paths

I have this list of paths: ...
4
votes
1answer
60 views

Basic network layer for a JSON API client

Just looking for some feedback/ways to improve this basic networking layer written in Swift. I'm still learning, please elaborate with as much detail as possible. ...
2
votes
1answer
71 views

JSON Parser, pulls data from a JSON file for analysis

This is the first time I have programmed something that I will actually personally use, so I am happy about that. I tried to write good code whilst applying functional programming concepts. So no ...
5
votes
0answers
196 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 ...
2
votes
1answer
101 views

Parsing data from JSON API in Pandas

I made a little program to parse data from an API. I do not have experience with Pandas. It is working but I would like to know how to do that better and more efficiently. ...
0
votes
0answers
301 views

A simple tax calculator

I have created a tax calculator using text fields and functions that would calculate the tax amount based on the bracket that the income falls into and shows the amount you have saved based on ...
2
votes
1answer
34 views

Batch retrieve formatted address along with geometry (lat/long) and output to csv

I have a csv file with 3 fields, two of which are of my interest, Merchant_Name and City. My goal was to output multiple csv ...
3
votes
1answer
64 views

How to model hierarchical json in Java

I'm a front end developer who is brand new to backend development. My task is to model json in a Java object. It's just some mock data for now that my controller returns. ...
2
votes
1answer
45 views

Rendering JSON arrays of unequal length as a table

I have a website where my users can create "table-like" layout dynamically. So imagine that my users can upload a text document, and then append columns to the document, and the output will then be ...
4
votes
2answers
246 views

JSON selector class in Python

I've created a simple little class called JSONSelector to be able to select relevant data from a JSON object (a dict in Python). ...
2
votes
0answers
36 views

Client wrapper for sending data to a downstream process

I am building a Python client for an alert process engine. The users can use this client to publish and clear the alerts. The client exposes two methods publish and clear to the users. These methods ...