ecmascript

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ecmascript preserves JavaScript JSON and string semantics at native boundaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalJSON

func CanonicalJSON(raw []byte) ([]byte, error)

CanonicalJSON validates input before applying JSON.parse/stringify semantics, preserving source key order and UTF-16 code units.

Types

type String

type String string

String carries JavaScript string code units. Lone UTF-16 surrogates use their WTF-8 encoding in the native string and their escaped code unit in JSON.

func (String) MarshalJSON

func (text String) MarshalJSON() ([]byte, error)

func (*String) UnmarshalJSON

func (text *String) UnmarshalJSON(raw []byte) error

Jump to

Keyboard shortcuts

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