mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:02:45 +00:00 
			
		
		
		
	
		
			
				
	
	
	
	
		
			768 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			768 B
		
	
	
	
	
	
	
	
Name
json - pretty-print a JSON file with syntax-coloring and indentation
Synopsis
$ json [options...] [path...]
Description
json pretty-prints a JSON file with syntax-coloring and indentation.
If no path argument is provided stdin is used.
Options
- --help: Display this message
- -i,- --indent-size: Size of indentations in spaces
- -q,- --query: Dotted query key
Arguments
- path: file to pretty-print
Examples
# Pretty-print stdin
$ cat /sys/kernel/processes | json
# Pretty-print a file
$ json json-data.json
# Pretty-print a file with two spaces per indent
$ json -i 2 json-data.json
# Query data from JSON
$ json -q 1 .config/CommonLocations.json
$ cat /sys/kernel/processes | json -q processes
