json

package
v2.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FastJsonConverter

type FastJsonConverter struct {
	sync.RWMutex

	FastJsonConverterConf
	// contains filtered or unexported fields
}

func NewFastJsonConverter

func NewFastJsonConverter(schema map[string]*ast.JsonStreamField, props map[string]any) *FastJsonConverter

func (*FastJsonConverter) Decode

func (f *FastJsonConverter) Decode(ctx api.StreamContext, b []byte) (m any, err error)

func (*FastJsonConverter) DecodeField

func (f *FastJsonConverter) DecodeField(_ api.StreamContext, b []byte, field string) (any, error)

func (*FastJsonConverter) Encode

func (f *FastJsonConverter) Encode(ctx api.StreamContext, d any) (b []byte, err error)

func (*FastJsonConverter) ResetSchema

func (f *FastJsonConverter) ResetSchema(schema map[string]*ast.JsonStreamField)

type FastJsonConverterConf

type FastJsonConverterConf struct {
	UseInt64        bool              `json:"useInt64ForWholeNumber"`
	ColAliasMapping map[string]string `json:"colAliasMapping"`
}

Jump to

Keyboard shortcuts

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