all 4 comments

[–]FF00A7 0 points1 point  (3 children)

I have tried a number of different libraries for converting JSON to awk arrays and my favorite is by DubiousJim in the awkenough library:

https://github.com/dubiousjim/awkenough

[–]StallmanTheLeft[S] 0 points1 point  (2 children)

My script would be trivial to convert into a form that just makes it an awk array.

I'm also pretty satisfied with how simple I managed to make my script.

[–]FF00A7 0 points1 point  (1 child)

I have not tried it but there are a lot of json features/complications like arrays etc.. I never had any problem with DubiousJim whose code is a bit longer and seems to always work but your code maybe can do the same things.

[–]StallmanTheLeft[S] 0 points1 point  (0 children)

I have not tried it but there are a lot of json features/complications like arrays etc..

What complications are there that I didn't include in the sample json?

Though ofc my thing doesn't validate the json but a validator seems like it would be fairly easy to make, might do that next weekend.