Parsing JSON with Python

My personal quick reference

It seems like every few months I have a project where I need to parse some JSON and pull out certain parts. Maybe the JSON came in JSON files, or maybe I retrieved it from an API. The duration between each of these occasions is long enough that I’ve had to relearn some basics each time, so a year or two ago I made a sample JSON file that demonstrates a few data structures and features, and then I wrote a Python demo script that parses them. Now I look at that script to review the basics…

A few years ago I wrote about some metadata that was 4,000 years old. Today I wanted to write about another high point in the history of metadata — well, some sort of point: the failure of Amazon’s folksonomy and the Playing with Fire album by Kevin Federline, the former Mr. Britney Spears. Throughout this discussion I’ll show some of the tags that Amazon users added to this album, and I’ll also provide a link to a page where you can see the top 100 entries. (As you’ll…

For this month’s blog entry I originally planned to create a reference for RDF serialization formats. My idea was to create a table listing all the known formats, with links to their specs (when they have one), their age, origin, a sample, and some opinionated comments–for example, why creating new documents in RDF/XML made sense in 1999 but no longer does.

SPARQLing anything

MS Office files, XML, markdown, plain text, and more.

SPARQL Anything is an open source tool that lets you use SPARQL to query data in a long list of popular formats: XML, JSON, CSV, HTML, Excel, Text, Binary, EXIF, File System, Zip/Tar, Markdown, YAML, Bibtex, DOCx, and PPTx. It has a lot of great documentation and features, but I’ll start here with an example of it in action.

For a long time I’ve thought that it would be fun to use SPARQL queries of Wikidata to create music playlists that can be played back. While researching last month’s blog entry Use SPARQL to query for movies, then watch them I learned about the P724 Internet Archive ID property, and that turned out to be an excellent hook for finding Wikidata audio recordings that we can listen to.