MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / PrintJSONCompact

Function PrintJSONCompact

internal/cli/format.go:520–523  ·  view source on GitHub ↗

PrintJSONCompact prints any value as compact (no-indent) JSON — a single line plus trailing newline. Preferred for machine-consumed payloads where pretty-print whitespace is pure overhead (e.g. `pad bootstrap`, whose canonical consumer is the /pad agent skill). Human inspection has the --format mark

(v interface{})

Source from the content-addressed store, hash-verified

518// canonical consumer is the /pad agent skill). Human inspection has the
519// --format markdown variant.
520func PrintJSONCompact(v interface{}) error {
521 enc := json.NewEncoder(os.Stdout)
522 return enc.Encode(v)
523}
524
525// PrintItemMeta prints item metadata header with colors.
526func PrintItemMeta(item *models.Item) {

Callers 2

bootstrapCmdFunction · 0.92
showCmdFunction · 0.92

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected