Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
18 views

Code to get data from rest api(JSON) extract variables and upload those to databse using MYSQL

I'm working with a REST API, first time doing this and i have a working code but its long and just looks messy to me. I just know there's a better and faster way to do it. But like I said it's my ...
3
votes
0answers
32 views

Python script for OpenStack health check

First time moving from Bash to Python for scripting and looking for feedback/improvements. I've spent the weekend learning about OOP, and am aware that not fully utilizing it in this script — so any ...
0
votes
0answers
15 views

Adding other icons such as skycons instead of apixu weather api own icons? [closed]

I am making a weather app using the apixu weather api. I'm trying to also add the animated skycons has icons instead of the icons the api gave. But when I change it to canvas for it to show the ...
0
votes
1answer
39 views

Reading a checklist with multiple sections from an Excel sheet into a JS object [closed]

I have written JS functions to convert an Excel sheet into a JS object. The structure of Excel sheet will look like this for the Single section, there can be multiple sections can have more than 25 ...
0
votes
2answers
80 views

Web scraping and speeding up performance

I was wondering if the following code could be altered to speed up the scraping process. I know xrp has many transactions, but it takes an hour to go through half a day of transactions (at the busiest ...
2
votes
2answers
56 views

Getting a JObject by a property value

I am building a contact management system. Each contact can relate to the business in one of three ways: client, service provider, and third party. I have a JSON file containing the relation types ...
0
votes
1answer
50 views

Python script to query REST API and write to database

I wrote the following sample script for learning purposes: ...
0
votes
1answer
83 views

Converting employee survey data from CSV to JSON

This Java code project was submitted for a job opportunity but was marked down for showing "bad habits that could be difficult to unlearn" but I am mystified by what this means. Any takers please. How ...
0
votes
0answers
25 views

Refreshable JSON settings file accessible for HttpClient provided by IHttpClientFactory

I'm trying to achieve the functionality of automatically reloaded JSON settings file and at the same time maintaining all the benefits of using IHttpClientFactory (...
0
votes
1answer
41 views

Namedtuple and list to populate each record of a JSON file

I had a JSON file in this format: ...
0
votes
3answers
101 views

Extracting information from JSON

Here is a simplified version of my JSON. ...
1
vote
0answers
18 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/...
1
vote
0answers
14 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/...
1
vote
0answers
15 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/...
2
votes
0answers
31 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/...
1
vote
0answers
44 views

Recursive object/array filter by key

I have some code that takes some JSON, parses it, and given an optional filter, will attempt to find any key (or nested key) that includes the filter (partial matching - it does not match values). The ...
0
votes
0answers
27 views

My JSON message parser, for my game protocol

I work on a game server that communicates with json, to use it in code, I have to analyze. However, there are several messages, but they all have the same parent structure. I do not know if it's a ...
2
votes
2answers
66 views

Reading a gzipped file with JSON data for thousands of users

I'm a newbie in Python. I need to read a GZ file contains thousands of users. But I think my code is not optimized in this case. Could anyone can help me? What should I do to improve performance? Or ...
1
vote
1answer
66 views

Sorting function from a React app to display JSON data in a sortable table

I created this simple react application for a coding challenge, which is described in the linked README file. Basically, I created the components and helper logic to display dynamic JSON data in a ...
0
votes
0answers
28 views

Http4s custom header with JSON payload

This is a custom http4s header based on the headers that are already provided which takes a io.circe.Json as its value. I'm ...
5
votes
1answer
138 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 ...
2
votes
1answer
57 views

Read gzipped JSON file from URL

I am requesting a JSON file that's gzipped. First, I download file: ...
0
votes
1answer
71 views

Parse JSON strings as tables using Python

Needed a simple CSV file that had headers and no nesting of data to consume in Tableau. The JSON file I was consuming had nested dictionaries and lists (which sometimes had in themselves nested lists/...
1
vote
1answer
103 views

Extracting a list of objects from a repository as JSON

Currently, I am using the below code to make JSON data from list of objects. ...
0
votes
1answer
42 views

Saving Reddit posts and comments from JSON into ArrayLists

I'm trying to get and save in an ArrayList Reddit posts and comments. The code is very similar for both: The RedditThing is a parent of RedditPost and RedditComment: ...
1
vote
0answers
35 views

Python Text RPG Item Management System (with CLI tool for creating JSON files)

I've been working on a full RPG skeleton for a while, and I've just now reached a point on the module dealing with items where I feel comfortable sharing. My intent was to create a structure for the ...
1
vote
0answers
26 views

Simple json config provider

I'm pretty new to this so constructive criticism is acceptable. I'm trying to find any way I can improve this system, all it does is take a string, determine if that string is a web address or a file ...
2
votes
1answer
43 views

PHP RSS/XML reader basic class

I write this class to process and output xml/rss feeds. I'm still working on, but any suggestion will be appreciated. As a little trick if the xml file come from an online resource, I've added a ...
0
votes
1answer
44 views

Python client to fetch JSON data from REST API, retrying on failure

As a beginner, I'd like to see if anyone can suggest any better way of coding the below, as I'm duplicating code and nesting identical if statements as part of the following problem. I'm grabbing ...
6
votes
0answers
62 views

Using decorated methods in a subclass of deque to dump its state to a JSON file

I am sub-classing an object in python and I need to overload a bunch of the methods with very similar logic, essentially a call to super() and then some additional operations. I want to avoid ...
3
votes
2answers
183 views

Using Python to create a JSON file of recipes from MySQL

I needed to create a JSON file from a couple of MySQL tables to migrate some recipes from wordpress. This was my first time writing a script in python and would like to get some feedback on what I ...
1
vote
2answers
52 views

Encoding multiple rows from prepared statement in php [on hold]

I have this code that hypothetically returns multiple rows from a database and encodes them in a JSON. I am wondering if this is the best and most presentable way to do it. Note: I am using msqli ...
2
votes
0answers
14 views

Looping JSON to get matching values from Database

I have a need to take in a payload that looks like this: ...
1
vote
1answer
71 views

Updating entries in a JSON file

I have the following Data.json file and I would like to update some of the values. ...
6
votes
0answers
70 views

HoloLens Unity program

I recently finished writing an HoloLens proof-of-concept program. It involves generating a user interface based on a connection with an OPC server. OPC involves industrial PLCs, one or more PLCs send ...
2
votes
1answer
214 views

Store nested json repsonses in relational database

The goal is to collect market data from a free rest api. The response is in json and size per response is above 1MB. I want to get at least updated data once per minute which means about 24h * 60min * ...
4
votes
2answers
87 views

Type-safe JSON deserialization

In a Python (3.6) application I receive messages from Kafka in JSON format. (The code base makes heavy use of static type annotations, and every file is automatically checked using ...
4
votes
2answers
73 views

Fetching data through HTTP and caching JSON result in a file

The task is to fetch some JSON data from an API with a GET request. If the location is not available for any reason, read a cache file. Otherwise write the cache file for future use. The following ...
2
votes
3answers
99 views

Converting objects into JSON and using the StringBuilder

In my scenario I have list of object in C# code and need to be converted into JavaScript object. But there are certain condition, where the value of the object might be dynamic based on certain key. ...
2
votes
1answer
171 views

Looping JSON in WebAPI Controller and Add new Property

I have a json array that is being passed into a function. Whenever the function comes across a field (call it Field1) in a record with a value that starts with "@!!!@" the function compile them into ...
3
votes
1answer
75 views

Extracting text from Bundestag proceedings as directed by XML files, and exporting to JSON

I have a long script here that does the following for me: I have 9000 XML files, from which I parse information, and then in about 7000 TXT files find the information out, and in the end it all save ...
17
votes
4answers
3k views

User login database intended for beginners

I have been working on a small project intended for helping beginner Python programmers getting an idea of what a real project could be like (as opposed to programming exercises and such). This ...
6
votes
2answers
326 views

Scan similar files in different directories and report differences

I wrote a program in Python that scans all files in a directory, makes dictionaries with stuff like date of creation and a hash of the contents of a file. Then i scan another directory which is just a ...
1
vote
1answer
829 views

Slow Converting from JsonArray to ArrayList

I have to convert a JsonArray to an ArrayList but unfortunately the code below is used very often during the execution of the program! How can I speed it up? Java: ...
2
votes
1answer
50 views

Convenience function for writing files in CSV, JSON, etc

The McCabe code complexity of the following function is 19 as found by pytest --mccabe test.py (from my toy-project mpu). While ...
0
votes
1answer
62 views

Live search project

I have a live search project and I don't know if it's secure enough or not. I don't access it directly, but I get data by JSON so I shouldn't worry about slashes or quotes, right? The PHP code: <...
3
votes
1answer
172 views

Show 3d models loaded via asynchronous request

First I explain the data to give context: We have the following folder structure: ...
4
votes
1answer
796 views

Trying to map JSON to different classes in web API [closed]

I have a controller action that takes JSON bodies. I know, that the JSON is either of type A or B, where both classes are of ...
1
vote
0answers
801 views

Function to Return a JSON Like Objects Using VBA Collections and Arrays

My goal is to create a compact function that can create a JSON Like object from JSON string. I want a function with a small footprint that I or anyone who wants to use it, can simply paste into a ...