strictjson

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package strictjson rejects text encodings that Go's JSON decoders would otherwise repair lossily before callers can enforce exact-text guarantees.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidUTF8      = errors.New("JSON text is not valid UTF-8")
	ErrInvalidSurrogate = errors.New("JSON text contains an invalid Unicode surrogate escape")
)

Functions

func ValidateText

func ValidateText(data []byte) error

ValidateText checks raw JSON text for valid UTF-8 and correctly paired UTF-16 surrogate escapes. The normal JSON decoder remains responsible for all other syntax validation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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