larsks / blog.oddbit.com

3 stars 0 forks source link

post/2023-07-27-jq-streams/ #33

Open utterances-bot opened 10 months ago

utterances-bot commented 10 months ago

Processing deeply nested JSON with jq streams :: blog.oddbit.com

I recently found myself wanting to perform a few transformations on a large OpenAPI schema. In particular, I wanted to take the schema available from the /openapi/v2 endpoint of a Kubernetes server and minimize it by (a) extracting a subset of the definitions and (b) removing all the description attributes. The first task is relatively easy, since everything of interest exists at the same level in the schema. If I want one or more specific definitions, I can simply ask for those by key.

https://blog.oddbit.com/post/2023-07-27-jq-streams/

qmacro commented 10 months ago

Thanks, a nice example of fromstream and tostream!