json

package
v2.0.0-alpha.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConverter

func GetConverter() (message.Converter, error)

Types

type Converter

type Converter struct{}

func (*Converter) Decode

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

func (*Converter) Encode

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

type FastJsonConverter

type FastJsonConverter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewFastJsonConverter

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

func (*FastJsonConverter) Decode

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

func (*FastJsonConverter) Encode

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

func (*FastJsonConverter) ResetSchema

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

Jump to

Keyboard shortcuts

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