jsonshared

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package jsonshared holds value coercion helpers shared by the ndjson and jsonarray packages.

Index

Constants

View Source
const SetArrayDelimiter = "|"

SetArrayDelimiter is the delimiter ValueToString uses when joining the elements of a JSON array cell into a string. Mirrors the default delimiter used by the import-side set inference probe.

Variables

This section is empty.

Functions

func CoerceValue

func CoerceValue(v any) any

CoerceValue attempts to convert string values to native JSON types (number, boolean, null) for cleaner JSON output.

func ValueToString

func ValueToString(v any) string

ValueToString converts a JSON value to its string representation for the tabular interface. Arrays of scalars are pipe-joined so downstream set-type inference can detect them by the standard delimited-cell heuristic; arrays containing objects fall back to the verbose Go-format representation so the inference path will not misclassify them as set fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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