jsonc

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package jsonc provides utilities for handling JSON with comments (JSONC).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripComments

func StripComments(data []byte) []byte

StripComments removes JavaScript-style comments and trailing commas from JSONC content. Handles both single-line (//) and multi-line (/* */) comments. Also removes trailing commas (commas followed only by whitespace before ] or }) which are valid in JSONC but not JSON. Preserves strings that contain comment-like sequences.

Types

This section is empty.

Jump to

Keyboard shortcuts

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