Skip to content

Instantly share code, notes, and snippets.

View gust-p's full-sized avatar

Gustavo Barrios gust-p

  • LexxPluss
  • Tokyo, Japan
View GitHub Profile
@gust-p
gust-p / jq-profilejsonschema.md
Created March 5, 2024 09:53 — forked from mikehwang/jq-profilejsonschema.md
Use jq to profile the schema of a given JSON object or an array of JSONs objects

Profile JSON schema

Using jq is great for examining JSON objects. You can extend its functionality with custom methods. The following is useful to understand at a high level the structure of arbitrary JSONs which is useful when trying to understand new data sources.

Requires jq verison 1.5.

Profile an object

Add the following method to your ~/.jq: