informatica:linux:json
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | informatica:linux:json [2020/01/29 17:12] (current) – jose | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Parsear json ====== | ||
+ | Para formatear toda linea | ||
+ | cat fichero.json|python -m json.tool | ||
+ | |||
+ | Para obtener un resultado (por ejemplo el inspect de docker) | ||
+ | cat fichero.json | jq -r ' | ||
+ | | ||
+ | Si un campo tiene un - hay que ponerlo entre comillas dobles. | ||
+ | fichero.json | ||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | cat fichero.json |jq -r ' | ||
+ | hola que tal | ||
+ | |||
informatica/linux/json.txt · Last modified: 2020/01/29 17:12 by jose