FLOX_advocate, to Seattle
@FLOX_advocate@floss.social avatar

I'm giving two talks at tomorrow (Sunday)

Mastodon and the Fediverse: Decentralized Social Networking and Services at 10:00

https://lfnw2024.sessionize.com/session/603213

Intro to jq: grep for JSON at 11:00

https://lfnw2024.sessionize.com/session/603215

I will be remote, but @SeaGL is on site and looking for volunteers for our November conference in

@lfnw

snonux, to random
@snonux@fosstodon.org avatar

I wasn't aware until now, that jq is actually a full blown functional programming language. Originally it was inspired by Haskell and the very first version(s) of jq were actually implemented in Haskell. Only later jq got ported over to C. To have an idea how powerfull the jq language is, there is also a jq implementation purely written in jq: https://github.com/wader/jqjq

kubikpixel, to webdev
@kubikpixel@chaos.social avatar

Awesome jq

A curated list of awesome things built with the JSON processor and turing-complete functional language jq.

./jq https://github.com/fiatjaf/awesome-jq


jbrains, to random
@jbrains@mastodon.social avatar

Trying to do something like with

I'm using Golden Master technique and I've committed the expected output to git.

This is "assert all remains well" while refactoring:

git diff --exit-code --quiet Testing/; if (( $? )) then; echo "FAIL"; else; echo "OK"; fi

wader, to haskell
@wader@fosstodon.org avatar
fedora, to linux
@fedora@fosstodon.org avatar

Learn how to write a text user interface (TUI) for yourself! Could be a nice way to smooth out your workflow in the terminal.

➡️ https://fedoramagazine.org/writing-useful-terminal-tui-on-linux-with-dialog-and-jq/

arda, to rust
@arda@micro.arda.pw avatar

Jaq:

A jq clone focussed on correctness, speed, and simplicity, written with rust

https://github.com/01mf02/jaq

#jaq #rust #rustlang #jq

annathepiper, to wordpress
@annathepiper@mastodon.murkworks.net avatar

Followup on this thread I posted earlier:

https://mastodon.murkworks.net/@annathepiper/111467755713006541

I have advanced the problem along a bit. My current problem is that in all my various directories of screenshot files, I have a metadata.json file I want to extract data from. I want to use the extracted data to build an appropriate "wp media import" command, to feed to WP-CLI.

Here's my dilemma: I don't know jq well enough yet. I've been trying to teach myself about how its filters work tonight, but I'm not quite comfortable enough with it or with bash to work out how to accomplish what I want to do.

Recommendations solicited. /1

iooioio, to random
@iooioio@fosstodon.org avatar

Just found out about . Like but for html. Perfect for scraping websites in combination with !

https://github.com/mgdm/htmlq

mnw, to TodayILearned

Wow my perception of jq as like a grep for json has been changed it is so much more like an awk for json. very cool Thank you @FLOX_advocate and

qmacro, to random
@qmacro@hachyderm.io avatar

Ok folks, I decided to work openly on my Community Theatre talk at and start writing my notes in the shape of a long-form article. All critiques welcome. Share & enjoy! (And caution: WIP!)

"Handle JSON like a boss with "
https://github.com/qmacro/teched-jq-talk

FLOX_advocate, to Seattle
@FLOX_advocate@floss.social avatar

I'll be talking about jq and JSON @SeaGL on Saturday, November 4th

I'm flying up to Seattle to be masked and in person. We're hybrid this year, so you can watch our talks remotely

This is part 3 of my jq trilogy, "Advanced jq: awk for JSON"

https://osem.seagl.org/conferences/seagl2023/program/proposals/950

because I'm looking forward to a fantastic meal while in town :)

nev, to random
@nev@bananachips.club avatar

Okay, wrestling with jq and I don't know enough about programming to google this effectively.

I have a bunch of different thingies, and some of them have the key 'heldBy: "Person"'. If I ask it to print "Held by (.heldBy)", the thingies that don't have the key just say "Held by null", and that looks gross. How do I tell jq to only print "Held by (.heldBy)" for each thingy if the key exists, and not print anything if it doesn't?

:boost_ok:

salcode, to composer
@salcode@phpc.social avatar

I've been using the command line tool a lot lately. One thing I'm enjoying is using it to extract data from composer.json

I made some notes about code I use to find a dependency and copy it to the clipboard when I don't remember the full name.

https://salferrarello.com/find-dependency-in-composer-json-with-jq/

bortzmeyer, to random French
@bortzmeyer@mastodon.gougere.fr avatar

Proposition de Captcha : demander au visiteur d'écrire un programme en pour un cahier des charges donné (genre, trouver tous les éléments d'un tableau qui contiennent un autre tableau qui contient une certaine chaine de caractères).
Ça élimine tous les robots et tous les humains. Seuls les mutants seront acceptés.

lucassatabin, to random
@lucassatabin@fosstodon.org avatar

This has been a long dream of mine, since I added JSON support in -data. And it has never been so close to become true: the PR adding support for queries (think ) is ready! It allows for declarative streaming extraction and transformation of JSON data, emitting data as soon as some piece of output has been built, discarding input that has been consumed, on the go. I must admit, that I am super proud of this one! https://github.com/gnieh/fs2-data/pull/426

clux, to rust

quick releases of the rewrite of yq (a multi-format wrapper) at https://github.com/clux/whyq

now handles all of jq's syntax, raw/compact/joined output, yaml/json/toml inputs & outputs, with jq module re-use for all formats!

anderseknert, to devops
@anderseknert@hachyderm.io avatar

Tonight I’m playing with , a tool originally intended as a replacement using as its query language, but which eventually grew to be useful for format transformations, and now a full-blown environment. All powered by . Madness, obviously, but just the right kind of madness.

https://sr.ht/~charles/rq/

bagder, to random
@bagder@mastodon.social avatar

did its first release in 5 years yesterday, now under a brand new github org and everything:
https://jqlang.github.io/jq/

KevinGimbel, to random
@KevinGimbel@fosstodon.org avatar
mate, to random French
@mate@3615.computer avatar

compare two JSONs with jq

"jq diff json"

https://gist.github.com
/ipan/e5e86d5495f16216e31fe12ebc9532a4

geekland, to linux Spanish
@geekland@mastodon.social avatar
manu, to opensource
@manu@hachyderm.io avatar

There’s a new jq release out. The first one in 5 years! Lots of big and little improvements thanks to a whole new maintainer team! So good to see that this great tool lives on! https://github.com/jqlang/jq/releases/tag/jq-1.7rc1

wader, to random
@wader@fosstodon.org avatar

Not so known fact: Last stable release was in 2018 😬

Since then there has been lost of bug fixes and improvements but the maintainers ran out of interest and stream. There has been a few attempts at creating a new org that have stalled. But last week the original author stedolan show up and blessed the new org and transfer the repo to https://github.com/jqlang. We're currently working on cleaning up and fixing broken CI, etc and hopefully there will be a new release! 🥳

ctietze, to random
@ctietze@mastodon.social avatar

Is it at all possible to use jq to replace JSON values with the output of a custom command?

Example: parse the value as a date, then add 3 days, then make this a string; replace the old value with this one.

The replacing itself with is simple, but I can't figure out how to "pipe" values

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • slotface
  • tacticalgear
  • cisconetworking
  • everett
  • Durango
  • rosin
  • InstantRegret
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Youngstown
  • mdbf
  • ngwrru68w68
  • JUstTest
  • kavyap
  • GTA5RPClips
  • Leos
  • normalnudes
  • cubers
  • osvaldo12
  • khanakhh
  • ethstaker
  • modclub
  • megavids
  • anitta
  • tester
  • lostlight
  • All magazines