jsonparser

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreator

func NewCreator(maxAttachments int, json serializer.JSONSerializer) parser.Creator

maxAttachments is the maximum number of the binary attachments to parse/send. If maxAttachments is 0, there will be no limit set for binary attachments.

Types

type Binary

type Binary []byte

func (Binary) MarshalJSON

func (b Binary) MarshalJSON() ([]byte, error)

func (Binary) SocketIOBinary

func (b Binary) SocketIOBinary() bool

func (*Binary) UnmarshalJSON

func (b *Binary) UnmarshalJSON(data []byte) error

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func (*Parser) Add

func (p *Parser) Add(data []byte, finish parser.Finish) error

func (*Parser) Encode

func (p *Parser) Encode(header *parser.PacketHeader, v any) ([][]byte, error)

func (*Parser) JSONSerializer

func (p *Parser) JSONSerializer() serializer.JSONSerializer

func (*Parser) Reset

func (p *Parser) Reset()

type ValueError

type ValueError struct {
	Value reflect.Value
	// contains filtered or unexported fields
}

This is a specific error type used with a reflect.Value.

func (*ValueError) Error

func (e *ValueError) Error() string

func (*ValueError) Unwrap

func (e *ValueError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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