json

package
v0.11.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package json provides JSON syntax highlighting for clog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Highlight

func Highlight(s string, styles *style.JSON) string

Highlight applies syntax highlighting to s using the provided styles. By default inter-token whitespace is stripped, flattening pretty-printed JSON to a single line. Set style.JSON.Indent to a non-empty string to pretty-print with indentation instead. Returns s unchanged when styles is nil.

The scanner is defensive: on any unexpected byte the remaining input is emitted unstyled rather than panicking.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL