jsjson

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: 2 Imported by: 0

Documentation

Overview

Package jsjson reads JSON the way JSON.parse and property access do where encoding/json differs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeIntegers

func NormalizeIntegers(data []byte) []byte

NormalizeIntegers rewrites each number literal that JavaScript reads as an integer but encoding/json refuses for an integer target (12.0, 1.2e1, 12E0, 120e-1, -0.0e0) to its plain integer text, and leaves every other byte alone. It returns data itself, without allocating, when nothing needs rewriting. A literal is rewritten only when its value is an exact integer below 2^53 in magnitude; strings are skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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