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
3
votes
1answer
39 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
85 views

Create Node tree from list of paths

I have this list of paths: ...
2
votes
0answers
21 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
52 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
118 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 ...
3
votes
1answer
53 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
62 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
46 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 ...
1
vote
1answer
19 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 ...
0
votes
0answers
22 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
211 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
34 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 ...
2
votes
3answers
56 views

Function to parse a Javascript object and return a CSV

This function converts a Javascript Object into a CSV. ...
4
votes
2answers
1k 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
0answers
31 views

Node JS | From Excel to Json

Intro -> I have to convert an excel file, which comes usually in this way: to a Json file that must looks like this: ...
3
votes
1answer
53 views

Building nested dictionaries to dump it to .json later

I am looking for some way to improve my code. It works but it doesn't look good and I am almost sure that lot of Best Practices rules are violated. The ...
2
votes
0answers
24 views

JSON flattening with object duplication on array property for CSV generation

I am looking for a way to transform JSON data into a flat "csv-like" data object. In some way, I am looking to "sqlirize" a mongodb collection. I have already check some json flat libraries in NPM ...
1
vote
0answers
16 views

Response structure with populated fields

I am working on a backend for an application using a microservice framework with Sequelize and it is populating in the following way (it does based on the table field): ...
4
votes
1answer
35 views

JSON from SQL Server: Reduce lists of single dicts to list of values

SQL Server 2016 introduced some JSON features, but they're far from robust. As far as I can tell, there's no way yet to output a simple array; everything must be in ...
3
votes
0answers
3k views

Function to return 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 ...
2
votes
4answers
6k views

Loading, parsing, and displaying a JSON file

I recently have been working on loading a local JSON file parsing it and displaying it using Javascript and I think I got it to where I really like it. I would like to know if anyone knows if there is ...
3
votes
1answer
64 views

CSV/JSON converter

This is my first Python script and I would like to hear the opinion of more experienced users, so I can do it right from the beginning instead of trying to correct my mistakes after months (years?) of ...
17
votes
4answers
4k 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 ...
1
vote
1answer
95 views

Parse provided json, and in jObject find and convert all jToken.double types that have whole number value to long type [closed]

I wrote code sample below that is finding decimal values in jObject without '.' char, and convert them to long type. The issue is that it works for max jObject that contains two child jObjects. ...
7
votes
1answer
192 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 ...
3
votes
0answers
32 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/...
0
votes
1answer
159 views

Simple calculation of sector coefficients using PHP

Function This class extends the key class, called EQ, and does basic calculation based on minutely data. It then calculates weight coefficients (e.g., [0, 1]) for ...
2
votes
1answer
92 views

Updating entries in a JSON file

I have the following Data.json file and I would like to update some of the values. ...
1
vote
1answer
39 views

Python functions to save JSON and H5 to local files and S3

I'm trying to copy files to S3 after writing them locally: I have 2 functions which I need to do this. What is the best way to refactor the code that exists in both. ...
2
votes
1answer
53 views

Using IndexedDB as an in-browser cache

In my site: Users have many Activities Each Activity has encoded_polyline data I display these encoded_polylines on a map I want to use IndexedDB (via Dexie) as an in-browser cache so that they don'...
4
votes
1answer
532 views

Should my Json storage handle exceptions?

I made a class to conviniently serialize/deserialize data. Now I'm stuck with the following question. Should I handle exceptions (use try-catch) inside JsonStorage ...
1
vote
1answer
29 views

Read and output a json object with the least server processing expenditure possible

On my server I have a large json that is accessed by several applications. One application only needs a certain part of the json, so presenting the whole json to the application is an unnecessary ...
1
vote
1answer
51 views

Simplified light Serialize/Deserialize to/from JSON for .NET

Just a very simplified and stright-forward way of serialize/deserialize to/from JSON using standard .NET 4+ libs. I was trying to avoid "complexity", so get rid of 3rd part libs and heavy-...
1
vote
0answers
26 views

Code for checking several conditions for the below json transformation

A json i have provided which is actually i am getting by hitting a Rest Service. To keep it simple I have provided that directly inside the method. A modal with textarea and accepr/Reject button has ...
1
vote
1answer
45 views

Reimplementation of call() method in JavaScript

I was try to reimplement the native call method in JavaScript. Here we need to handle the object which we pass in the call function and additional params. I handle ...
8
votes
1answer
58 views

JSON messaging queue with transformation and dispatch rules

I put together this code as part of a practice problem. The instructions for the program are to accept JSON messages, transform the messages and then dispatch them to the right queue according to a ...
2
votes
1answer
128 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 ...
2
votes
1answer
1k views

Populate TableView with JSON data

I basically want to display JSON data in a TableView. The TableView always displays a List ...
1
vote
1answer
75 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: <...
1
vote
0answers
34 views

Java local service with sockets

My goal was to create a Java service on Windows that runs locally and communicates with local programs using JSON. The service should be reliable and robust. The service runs a ServerSocket and ...
0
votes
0answers
18 views

Asking data to a Servlet from jsp and send them back to the jsp

Image that a user have to book a private lesson by compiling this form. Using MVC pattern I'm building a WebApplication to achieve this goal; I have a jsp wich contains the form and by using Ajax I ...
1
vote
0answers
155 views

Angular 7 - Mapping nested arrays from api response

I have some selects on my html page that I want to populate with the response from my backend api. The response looks like this JSON response ...
3
votes
1answer
3k views

Shuffling a JSON array in Java

Since I did not get a satisfactory answer here (and I really needed to get it going on this weekend), I decided to implement my own Fisher–Yates shuffle, porting the code I found in other SO posts. I ...
1
vote
1answer
46 views

Wrapping certain elements in an array with an array with PHP

I have a function that's doing this correctly, but I feel as though this can be done (possibly) with minimal code, with recursion, but I'm just wracking my brain. Basically I have JSON that gets ...
3
votes
2answers
149 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 ...
-1
votes
1answer
86 views

Read JSON files, basic calculations and write over another JSON file

Class SectorController calculates weight coefficients for sector performances in equity exchange markets using minute data from an API (for instance, if a group of ...
0
votes
0answers
32 views

Fetch the multiple images from JSON using foreach

I am fetching the images & its positions from JSON using foreach.... Is there any way i can improve code standard for performance & other things.... https://codepen.io/kidsdial/pen/EMQVqK ...
8
votes
1answer
191 views

Recursive parser from Binary to JSON output

Background I got this interview test and got declined due to not meeting their expectations, but never got a reason on what was bad and how they solved it. I want to improve and learn something out ...
3
votes
1answer
234 views

Convert bitcoin value based on exchange rate from JSON API

I’m learning F# and trying to find a more ‘functional’ way to code a simple program that retrieves the price of BTC and calculates the EUR value of an amount of Bitcoin. ...
0
votes
0answers
86 views

jenkins deployment making the build very slow

I am new to Jenkins. I am doing a build through Jenkins, but the build is very slow. Is there any way I can speed it up? ...