jsonfmt

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package jsonfmt renders scalar values as JSON for the nested-type renderers shared by the Thrift (arrowbased) and kernel (arrowscan) result paths. It matches encoding/json.Marshal except that non-finite floats become the JSON strings "NaN", "Infinity", and "-Infinity" rather than errors.

Those renderers marshal one scalar per nested element, so per-call overhead dominates. Go 1.27 routes encoding/json through the json/v2 engine by default, which made that per-call cost markedly higher; formatting the common scalar types directly avoids it. Anything not handled here falls back to json.Marshal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(dst []byte, v any) ([]byte, error)

Append appends the JSON encoding of v to dst and returns the extended slice. Unlike json.Marshal, it quotes non-finite floats instead of rejecting them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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