strictjson

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package strictjson is JSON encoding that reports a value strict JSON cannot carry as Chord's copyJson does (packages/chord/src/json.ts), instead of with encoding/json's own text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error) error

Error maps an encoding/json failure to chord's strict JSON error where one applies, and returns any other err unchanged. A value's own MarshalJSON may use either JSON package, so the failure can arrive as either package's error.

func Marshal

func Marshal(value any) ([]byte, error)

Marshal is json.Marshal with a non-finite number or a function reported as chord's strict JSON error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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