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

Function PrintJSONCompact

internal/cli/format.go:431–434  ·  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

429// canonical consumer is the /pad agent skill). Human inspection has the
430// --format markdown variant.
431func PrintJSONCompact(v interface{}) error {
432 enc := json.NewEncoder(os.Stdout)
433 return enc.Encode(v)
434}
435
436// PrintItemMeta prints item metadata header with colors.
437func PrintItemMeta(item *models.Item) {

Callers 1

bootstrapCmdFunction · 0.92

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected