json

19 posts tagged “json”.

  1. 2025
  2. 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.

    1 min read
  3. Streaming output of an indented JSON array

    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…

    2 min read
  4. Generated a summary of nested JSON data

    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…

    1 min read
  5. Extracting web page content using Readability.js and shot-scraper

    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…

    1 min read
  6. Convert git log output to JSON using jq

    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…

    1 min read
  7. Generating OpenAPI specifications using GPT-3

    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.

    1 min read
  8. 2024
  9. Exporting Amplitude events to SQLite

    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…

    1 min read
  10. Exploring OpenAI's deep research API model o4-mini-deep-research

    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.

    1 min read
  11. How to read Hacker News threads with most recent comments first

    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.

    3 min read
  12. Comparing database rows before and after with SQLite JSON functions

    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.

    1 min read
  13. Processing a stream of chunks of JSON with ijson

    A follow-up to Using OpenAI functions and their Python library for data extraction and Using the ChatGPT streaming API from Python.

    1 min read
  14. JSON Pointer

    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.

    1 min read
  15. Export a Mastodon timeline to SQLite

    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…

    1 min read
  16. 2023
  17. Constructing GeoJSON in PostgreSQL

    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…

    1 min read
  18. Extracting objects recursively with jq

    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…

    1 min read
  19. Converting Airtable JSON for use with sqlite-utils using jq

    The Airtable API outputs JSON that looks like this: The items in the array each have an , a nested dictionary and a .

    1 min read
  20. How I studied for my Ham radio general exam

    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).

    4 min read
  21. Comparing two training datasets using sqlite-utils

    WizardLM is "an Instruction-following LLM Using Evol-Instruct". It's a fine-tuned model on top of Meta's LLaMA.

    3 min read
  22. Converting no-decimal-point latitudes and longitudes using jq

    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…

    1 min read