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
0
votes
0answers
18 views

Optimized method of transfering numpy image arrays over localhost to web-tech UI for desktop UI

I have been doing testing to find the most efficient way to display numpy array images to a HTML, CSS, JS UI (specifically, with CEF Python). I mainly used the method explained here to do the numpy ...
3
votes
2answers
59 views

Web Scraping, Serializing and Deserializing in Python

I scraped data from a local .html page and the below code is working. I am a newbie to scraping, just tried with a simple HTML page. It takes 10 sec to complete execution and print data. If I did ...
0
votes
1answer
51 views

Is this a good way to download images from json Api?

In my SwiftUI app, I'm trying to get some data from a json Api and display this data along with an image. First I have a function that fetches the data from the Api, then I have another function that ...
2
votes
2answers
158 views

Getting metadata from MusicBrainz service

I've written a program which does the following things: calls third-party utility to get mp3 file fingerprint asks MusicBrainz IDs from AcoustID service asks metadata from MusicBrainz for each ID I'...
3
votes
1answer
56 views

C99 JSON parser/writer

About I've decided to challenge myself and write a JSON parser in C99 (i've written them in C++ before, but never in plain old C), and here's what I ended up with, it works well from what I've tried. ...
10
votes
1answer
1k views

Parsing overly complex JSON

The Merriam-Webster Dictionary API at some point discontinued the use of XML in favor of exclusively returning JSON. This had the unfortunate effect of making finding a definition listed by sense ...
4
votes
1answer
41 views

Geocoding addresses from a SAP database

I'm new to python and curious if this is the most efficient way to read addresses from a SAP database, geocode them, read the results, and then write the information back to the database. Everything ...
1
vote
1answer
36 views

Transform Data from JSON and CSV to another JSON format

I have 2 files wholesaler_a.csv ...
1
vote
0answers
35 views

Command line utility for user data migration from MUBI.com to letterboxd.com

Please make code review for command line utility for user data migration from MUBI.com to letterboxd.com. Utility makes Get HTTP request downloads json-data, parses it and saves as CSV-file. Can be ...
5
votes
3answers
71 views

JS function to initialize properties

I have some JavaScript code to manage a 2D map in a game. I have a function to create a new room in the map which is at map[x][y]. I need to create that property ...
6
votes
1answer
141 views

Parsing a JSON one line at a time in Python

happy 2021 everyone! I started coding some months ago for fun and recently I challenged myself to build a JSON parser in Python (v3.8). The basic idea was to avoid loading the whole file at once, ...
2
votes
2answers
76 views

API response json to C# object

So I got kind of a weird format returned from the api I'm calling it's the following: ...
0
votes
1answer
44 views

Unity Static Singleton JSON Serialisation

I have a static PlayerData singleton which stores all the data for the player (gold, upgrades, heroes etc) but JsonUtility ...
2
votes
1answer
75 views

Modify original JSON few times and post http request

Follow up question from here. I am working on a project where I need to do below things in Python: Take few input parameters like - environmentName, ...
3
votes
2answers
89 views

Pretty print directory structure in a JSON recursively

I am trying to pretty print the directory structure defined in a JSON. I do have a solution using recursion but I'm looking for feedback on how this solution can be ...
10
votes
1answer
264 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 - <...
2
votes
1answer
44 views

Program efficiency vs user experience. Python Ancestor app

Bit of a basic question but I was creating a ancestor/family tree app thingy (haven't really worked out the details) and I wrote a small start-up program (seen below) which checks the AppData ...
5
votes
1answer
161 views

AJAX with Vanilla Node.js/JavaScript – POST JSON without a form

I am new to node.js, ajax, and asynchronous code. I’ve pieced together a working way to exchange json between browser and server and am wondering if someone with more experience considers the approach ...
3
votes
2answers
113 views

Java 8: Memory/Run-time Performance optimization to transform Json structure

Here is the sample Students json am processing ...
4
votes
1answer
130 views

Parse json manually to POCO classes

I have below json which I need to deserialize in C# - ...
3
votes
0answers
43 views

Objective C String to JSON formatting

Quick disclaimer. I've programmed Java for years but this is the first Objective C I've ever written. I've written some code which almost unfortunately works but frankly hurts my eyes with the number ...
4
votes
1answer
46 views

Add lines from files to corresponding dictionaries

I have to iterate through multiple text files. For each file I read its contents and append each line to its corresponding dictionary to then build a JSON file. Each text file has the following ...
1
vote
1answer
48 views

Json config loader class

Currently the class takes a json file and retrieves data from it, and i'd like to improve this class. ConfigLoader.h ...
1
vote
0answers
29 views

How can this JavaScript CSV to JSON hook code be optimized to prevent timeouts?

This code is utilized within a platform that has strict limitations on script execution time, occasionally being exceeded if there is a very large number of lines within the CSV input that is passed ...
2
votes
1answer
117 views

Map/Reduce multi level JSON object

I have a list of rescues for ambulance drivers in different states that are displayed on a kanban board. My JSON object is divided by the status of the rescues, and then grouped by driver. The ...
3
votes
1answer
156 views

JSON serializable string enum in C# with generic JsonConverter

How can StringEnumeration be changed in the code below into a generic class, so that ConsensusState wouldn't need the ...
4
votes
1answer
78 views

How to properly decode a JSON dictionary into different Swift classes using Decodable and JSONDecoder?

Generally, the approach I've taken is to try calling container.decode from a decodable enum with its associated value returning ...
7
votes
0answers
100 views

React Typescript Boilerplate

I'm trying to build a React Boilerplate Using multiple tools. They are all: React, TypeScript, ESLint, Webpack, Babel, Prettier, VSCode and with Airbnb's code style guide. Actually, this is my first ...
2
votes
1answer
115 views

Request mixed with JSON strings and array fields, in custom function for reduction need Simplify/Refactory

Client From a POST request I get a mixed structure of an array and JSON. To handle multiple type of elements I am using var_dump to get the passes. For ...
5
votes
1answer
69 views

Reddit Hangman Bot Python3

Back with another Reddit bot. This one provides games of Hangman to an arbitrary number of players simultaneously. Users interface with the bot by mentioning it for a new game. Once that game is ...
2
votes
1answer
44 views

Vue.js dynamically passing in functions [closed]

I have a jsonArray.js file ...
4
votes
1answer
147 views

Extract string list as array from an array of objects

Having the following array of objects of ingredients used by cooks ...
3
votes
1answer
45 views

Extracting average time series

I have this JSON code that I got from a get request with Azure API. Everything works how I want it but it doesn't look good. There must be an easier way to parse the data. ...
1
vote
1answer
61 views

Any better way to read Json array

I have a json file - WorkflowNames.json with contents as - ...
0
votes
2answers
169 views

Python arbitrary objects Serialization and Deserialization [closed]

I am trying to convert objects inside an object(arbitrary objects) to Json and later retrieve it. I have developed some codes and would like to share if there is any problem in the code. ...
4
votes
0answers
43 views

JsonStatus - A tiny C++ JSON writer

JsonStatus (as in status file) Goal A simple and fast JSON writer in C++ (JSON output only). When you need something so small that you're not sure you even need a JSON library and you don't feel like ...
1
vote
0answers
388 views

Excel to Json getting file data into state in React JS

I am using dropzone and XLSX to load excel documents and then convert them into json. The goal is to upload as many documents as possible and it will create an object with a key of the file name and ...
1
vote
1answer
53 views

Creating a Navbar Menu from JSON data with Lodash

I am trying to create a navbar menu from JSON data. Actually I have achieved it but I am looking for feedback not to call getItems twice? How can I improve my code? ...
3
votes
1answer
108 views

JSON Data-structure in C++ and querying it

As a personal challenge I want to implement a C++ JSON Parser. As part of that I have implemented the following Types/Data-structures and a way of querying them. To represent the type of an individual ...
6
votes
2answers
156 views

JSON reader based on a pushdown automata

I haven't used C++ in over a decade, so to learn modern C++ (17) I built a JSON reader based on a pushdown automata (PDA). The general idea is this: A stream is passed to ...
0
votes
0answers
33 views

To assign objects from array of objects to mulitple arrays in JavaScript

Suppose I have this array that contains objects: ...
2
votes
1answer
76 views

JSON Input validator and Parser

There are probably a lot better ways to do it, but take it as a learning exercise. Basically below is the JSON InputValidation and parsing using nlohmann::json ...
1
vote
1answer
18 views

Using a dictionary template for consistent response structure from an API

I am making a simple API for news items using Python and the Bottle framework. I return a Python dictionary from my endpoints as Bottle converts this to JSON automatically in the response to the ...
0
votes
1answer
131 views

REST API PHP find by id

Description: The web server retrieves data from file database (pdf, doc, 3d file, zip and rar) and financial program such as inventory, price, indexes, order status and so on. I'm doing REST API PHP ...
2
votes
0answers
21 views

A service that posts JSON to a server and works with responses

...
4
votes
1answer
46 views

Time Tracker using JSON

This is a simple command line interface program that just keeps track of duration spent on multiple tasks. Any areas of improvements are welcomed to be pointed out. ...
4
votes
1answer
461 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 ...
2
votes
3answers
345 views

Efficiently convert 60 GB JSON file to a csv file

Description Simply take a JSON file as input and convert the data in it into a CSV file. I won't describe the functionality in too much detail since I have reasonable docstrings for that. As you can ...
2
votes
0answers
19 views

Re-interpolating a value from jq back into jq

I have an almost-json document in a file named "versions.json" like this: ...
3
votes
2answers
186 views

Parsing nested JSON with Haskell and Aeson

I'm trying to reduce nested JSON data using Haskell and Aeson without creating data/record types. The following code works, but seems ugly and unreadable. Any advice on cleaning this up would be great....

1
2 3 4 5
17