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.

121 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
75 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). ...
5
votes
0answers
335 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 ...
5
votes
0answers
230 views

Chaining JSON transformations with visitors

I have currently two use-cases that require JSON transformations before it can be deserialized. The first use-case requires changing the custom short type property name from ...
5
votes
1answer
152 views

GitHub API client

Here is my Haskell program designed to list all of my GitHub repos along with their descriptions and languages via the GitHub JSON APIs: ...
4
votes
0answers
36 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 ...
4
votes
0answers
38 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 ...
4
votes
0answers
50 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 ...
4
votes
0answers
617 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: ...
4
votes
0answers
26 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/...
4
votes
0answers
50 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/...
4
votes
0answers
106 views

Dynamically creating login screen on Android devices

This has been an experience. I'm well above "hello world" java is not a language I use often when programming and I don't program too much. I find myself a lot on Google.... basically just about for ...
4
votes
0answers
65 views

Angular directive to fetch resources to fill a table

I created a directive that solves my immediate problem, but I'm trying to find ways to make it more reusable. My immediate problem was, I have a table and needed to fill in one of the columns with ...
3
votes
0answers
271 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
0answers
116 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 ...
3
votes
0answers
3k views

Deserializing JSON with Utf8JsonReader

Path of Exile is a PC game where players can list their items for sale. The game has a public API that serves JSON which contains all of these items. My application consumes that JSON and indexes the ...
3
votes
1answer
268 views

MySQL JSON diff procedure

I'm building a procedure which compares two JSON objects and return two JSON objects with differences between each (compared keys and values). But I have relatively superficial SQL knowledge, so I ...
3
votes
0answers
286 views

Using Python threads to download images

I am using Python threads to download images. I have a JSON file that contains URLs to the images in the following structure: ...
3
votes
0answers
85 views

Network abstraction layer for a JavaScript JSON API client

I'm rewriting collection-json.js, a client for Collection+JSON. (Collection+JSON is a HATEAOS API media type built on top of JSON.) My Goals: Remove CoffeeScript webpack UMD so it can be used via ...
3
votes
0answers
634 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 ...
3
votes
0answers
38 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/...
3
votes
0answers
5k 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 ...
3
votes
0answers
324 views

Accessing Apixu weather API

My code is a module to simplify accessing a weather API. I'm quite certain it could be simplified, just not sure how yet. Some advice would very much be appreciated. Possibly use individual classes ...
3
votes
0answers
27 views

Testing whether pages can be fetched from two ports

I have an endpoint in my API which does a port test on 4455 and 4456 once a client GET's it. This is accomplished by requesting two web pages. The result will respond to the client with a JSON object: ...
3
votes
0answers
102 views

Filtering OTC market data

It's been one month I do programming in python. Hence, my experience is a bit limited. Here is what I've done so far. The program is only filtering OTC market data according to certain features. Could ...
3
votes
0answers
678 views

Implementing a JSON-serializable ORM model

I implemented a library which, amongst other things, implements a JSON-serializable ORM model based on the peewee framework. Here's the relevant excerpt: ...
3
votes
0answers
759 views

D3 Force-Directed Graph with Numerous Functionalities

I have a d3.js force directed graph that is driven by the code below. I am relatively new to d3, and much of the code is pieced together from various examples found online. If anyone has a moment or ...
3
votes
0answers
86 views

MVC JavaScript app to display athletes by country

I'm new to javascript programming and not sure if I'm coding correctly. For testing myself I created a small JS application. The idea of app is: List of athletes, grouped by country and the ...
3
votes
0answers
1k views

Encode object to JSON and encrypt with AES (with tests)

While the task at hand is relatively straightforward, it turned out AES in Go is a bit clunky so I was wondering if this seems right. Also, any tips on Go coding in general are more than welcome. <...
3
votes
0answers
167 views

Perl nagios plugin to query an api, obtain date from json, and determine if the date is within thresholds

This is an update of Using an API to obtain JSON data and get the date string and determine if data is stale This is a nagios check that will use an API URL, get JSON data, flatten the data into a ...
3
votes
0answers
599 views

JSON schema visualizer

I have the following backbone function to read a JSON schema and draw the tree structure (as in the screenshot below). I want to make sure if checking against the type as object/array is alright or if ...
3
votes
0answers
759 views

Web service for Android clients to store images

I wrote this code for Android server interaction. The way I built the client was an onSharePreference of strings includes photo encoded to a base64 ...
2
votes
0answers
20 views
2
votes
0answers
14 views

Re-interpolating a value from jq back into jq

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

Bash bitcoin blockchain explorer

I wrote a little bash script that displays the transaction info in json: ...
2
votes
0answers
253 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 ...
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). ...
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 ...
2
votes
0answers
669 views

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 ...
2
votes
0answers
53 views

Parsing potentially nonexistant JSON fields in JavaScript

Context: I'm currently toying with the Google Geocode API to break down address strings into a more machine-friendly format. The problem is that neither the user input or API output are 100% ...
2
votes
0answers
22 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/...
2
votes
1answer
252 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
0answers
33 views

Looping JSON to get matching values from Database

I have a need to take in a payload that looks like this: ...
2
votes
0answers
115 views

Determine the country by an IP

EDIT: I have updated the code, if you have comments about the previous version of the code, please do post them anyway. The task is to determine the country by an IP. Provided programme queries two ...
2
votes
0answers
55 views

Basic to-do CLI app (with JSON for persistence) using Python

I’m very new to Python. I wanted to start out with a simple project: a CLI app that keeps track of my to-do’s. The code works as intended, but is what I have written is any good? File structure: <...
2
votes
0answers
50 views

Controller to execute AJAX requests for a client

I have been developing this structure or pattern (I don't really know how to call it). It's my first time doing something like this, and I'm a bit worried about the future, if it becomes unmanageable. ...
2
votes
0answers
50 views

Display results from a JSON response based on game type

This code currently works with no errors. I want to know if there is a way to improve its conding structure, as there is a lot of repetition and it looks really bad. I tried an alternative way by ...
2
votes
0answers
168 views

EF mapping complex type to JSON in DB

I am trying to map a complex type to Json and store the info as Json in the DB using EF6 Code First. Here's what I have for now: The complex type ...
2
votes
0answers
217 views

Search GitHub users when text field changes in Kotlin Android app

Problem: Search for users by their name using the GitHub API (sorted by the number of followers) and display the results in a RecyclerView. Implementation: Hitting the GitHub API every time when user ...
2
votes
0answers
124 views

Scraping data from json response using twofold request

I've written a script which is able to get javascript encrypted links from a webpage and then using those newly produced links by making another request It can reach the target page and going there it ...
2
votes
0answers
689 views

JObject Pattern Matching: Merging partial WEB API JSON payload

This library [GitHub] helps merging partial WEB API JSON payload with existing prepopulated DTO objects. Let's say that JSON is represented by JObject from JSON.NET package. Naïve implementation ...