Flattening nested JSON objects with jq
I wanted to take a nested set of JSON objects and import them into a SQLite database using - but I wanted to "flatten" some of the nested rows.
19 posts tagged “json”.
I wanted to take a nested set of JSON objects and import them into a SQLite database using - but I wanted to "flatten" some of the nested rows.
For paginate-json I wanted to implement streaming output of an indented JSON array to my terminal. The final output should look like this: But I needed this to work for an arbitrarily long sequence of…
I was trying to figure out the shape of the JSON object from https://github.com/simonw/coronavirus-data-gov-archive/blob/master/data latest.json?raw=true - which is 3.2MB and heavily nested, so it's…
Readability.js is "A standalone version of the readability library used for Firefox Reader View". I figured out how to use the two of these together to extract the core content from a web page using…
I just spent way too long messing around with ChatGPT (transcript here) trying to figure this out. After much iteration, here's a recipe that works (mostly written by me at this point): The output…
I wanted to start playing around with OpenAPI. I decided to see if I could get GPT-3 to generate the first version of a specification for me.
Amplitude offers an "Export Data" button in the project settings page. This can export up to 365 days of events (up to 4GB per export), where the export is a zip file containing gzipped…
I was reviewing some older PRs and landed this one by Manuel Solorzano adding pricing for o4-mini-deep-research and o3-deep-research to my llm-prices.com site.
Hacker News displays comments in a tree. This can be frustrating if you want to keep track of a particular conversation, as you constantly have to seek through the tree to find the latest comment.
Here's a trick I've been using to compare the rows in a table before and after I perform an operation against it. It works well for a few hundred (and maybe a few thousand) rows.
A follow-up to Using OpenAI functions and their Python library for data extraction and Using the ChatGPT streaming API from Python.
I'm looking at options for representing JSON validation errors in more JSON. The recent RFC 7807: Problem Details for HTTP APIs looks relevant here.
I've been playing around with the Mastodon timelines API. It's pretty fun! I'm running my own instance which means I don't feel limited by politeness in terms of rate limits - if I'm just using my own…
In order to efficiently generate a GeoJSON representation of a vast number of locations, I'm currently experimenting with generating the GeoJSON directly inside a PostgreSQL SQL query using and…
The Algolia-powered Hacker News API returns nested comment threads that look like this: https://hn.algolia.com/api/v1/items/27941108 (For this story: https://news.ycombinator.com/item?id=27941108) I…
The Airtable API outputs JSON that looks like this: The items in the array each have an , a nested dictionary and a .
I scraped a pass on my Ham radio general exam today, on the second attempt (you can retake on the same day for an extra $15, thankfully).
WizardLM is "an Instruction-following LLM Using Evol-Instruct". It's a fine-tuned model on top of Meta's LLaMA.
I had some data with weird co-ordinates in it: Note the and in there. I know that this data refers to somewhere in Houston, and a few people on Twitter pointed out that it's actually really simple…