json

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

package json includes JSON utilities commonly used in Kwil.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalMapWithoutFloat

func UnmarshalMapWithoutFloat[T UnmarshalObject](b []byte) (T, error)

UnmarshalMapWithoutFloat unmarshals a JSON byte slice into a slice of maps. It will try to convert all return values into ints, but will keep them as strings if it fails. It ensures they aren't returned as floats, which is important for maintaining consistency with Kwil's decimal types. All returned types will be string, int64, or a []any.

Types

type UnmarshalObject added in v0.3.0

type UnmarshalObject interface {
	map[string]any | []map[string]any | []any | string | int64
}

Jump to

Keyboard shortcuts

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