skip to Main Content

Json – Connecting to an API and parsing the data

import requests import json def jprint(obj): text = json.dumps(obj, sort_keys=True, indent=4) if name == "main": response = requests.get("https://anapioficeandfire.com/api/characters/583") jprint(response.json()) data_list = response.json() my_dictionary = data_list[0] tvSeries = int(input("What series do you want to search?")) final_dictionary = {} for elem in…

VIEW QUESTION

Parse JSON in Dhall

Dhall is famous for generating JSON, namely from input.dhall to output.json. Is it possible to write a “JSON transformer” in Dhall, namely “input.json + rules.dhall → output.json”? It still sounds functional (two input and one output), but I wonder whether…

VIEW QUESTION

Decoding JSON data SwiftUI

I am attempting to decode JSON data in SwiftUI however have run into an issue I can't seem to solve. I am able to extract the data for one ticker symbol (it presents a bunch of information about a specific…

VIEW QUESTION

Parse nested JSON in SQL

I have this JSON: [{ "id": 1, "meta": [{ "key": "key1", "value": "ValueKey1" }, { "key": "key2", "value": "ValueKey2" } ] }, { "id": 2, "meta": [{ "key": "key2", "value": "ValueKey2" } ] }, { "id": 3, "meta": [{ "key":…

VIEW QUESTION

OpenEdge JSON with a extent propertry

I'm having trouble reading a JSON that has a extent[6] data property. This is the JSON: { "SalesRep": [ { "SalesRep": "BBB", "RepName": "Brawn , Bubba B.", "Region": "East", "MonthQuota": [ 1600,1648,1697,1748,1800,1854 ] } ] } I want to read…

VIEW QUESTION
Back To Top
Search