Documentation ¶
Overview ¶
Package json is used to beautify the json output. The json data can come from files, networks and linux pipelines, such as: show json --file data.json data.name means to view the data.name in the data.json file, show json --remote https://raw.githubusercontent.com/anqiansong/show/main/testdata/data.json data.user.name means to view the data.user.name in data.json, echo'{"name":"foo"}' | show json name means to view the data which json key is name
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "json", Usage: "json beautify output", Description: "display a file or remote json data, you can display the json data you need by specifying the json field key, \n" + "if you don’t specify the key, the complete json data will be displayed\n" + "eg:\n" + "show json --remote https://raw.githubusercontent.com/anqiansong/show/main/testdata/data.json data.user\n" + "show json --file data.json", Action: actionJson, Flags: []cli.Flag{ &cli.StringFlag{ Name: "remote", Usage: "show json from remote", Aliases: []string{"r"}, }, &cli.StringFlag{ Name: "file", Usage: "show json from file", Aliases: []string{"f"}, }, }, }
Command describes a subcommands in application.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.