Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

encoder

v0.0.0-20250722074740-d61791e4306e
github.com/going/json/internal/encoder

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

620 matches

Top ↑

This files's processing codes are inspired by https://github.com/segmentio/encoding. The license notation is as follows.

MIT License

Copyright (c) 2019 Segment.io, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Code generated by internal/cmd/generator. DO NOT EDIT!

This files's string processing codes are inspired by https://github.com/segmentio/encoding. The license notation is as follows.

MIT License

Copyright (c) 2019 Segment.io, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Constants

StartDetectingCyclesAfter

const StartDetectingCyclesAfter = 1000

Variables

Marshal (2 declarations)

var (
	Marshal   func(interface{}) ([]byte, error)
	Unmarshal func([]byte, interface{}) error
)

Functions

AppendBool

func AppendBool(_ *RuntimeContext, b []byte, v bool) []byte

AppendByteSlice

func AppendByteSlice(_ *RuntimeContext, b []byte, src []byte) []byte

AppendComma

func AppendComma(_ *RuntimeContext, b []byte) []byte

AppendCommaIndent

func AppendCommaIndent(_ *RuntimeContext, b []byte) []byte

AppendFloat32

func AppendFloat32(_ *RuntimeContext, b []byte, v float32) []byte

AppendFloat64

func AppendFloat64(_ *RuntimeContext, b []byte, v float64) []byte

AppendIndent

func AppendIndent(ctx *RuntimeContext, b []byte, indent uint32) []byte

AppendInt

func AppendInt(_ *RuntimeContext, out []byte, p uintptr, code *Opcode) []byte

AppendMarshalJSON

func AppendMarshalJSON(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

AppendMarshalJSONIndent

func AppendMarshalJSONIndent(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

AppendMarshalText

func AppendMarshalText(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

AppendMarshalTextIndent

func AppendMarshalTextIndent(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

AppendNull

func AppendNull(_ *RuntimeContext, b []byte) []byte

AppendNumber

func AppendNumber(_ *RuntimeContext, b []byte, n json.Number) ([]byte, error)

AppendString

func AppendString(ctx *RuntimeContext, buf []byte, s string) []byte

AppendStructEnd

func AppendStructEnd(_ *RuntimeContext, b []byte) []byte

AppendStructEndIndent

func AppendStructEndIndent(ctx *RuntimeContext, code *Opcode, b []byte) []byte

AppendUint

func AppendUint(_ *RuntimeContext, out []byte, p uintptr, code *Opcode) []byte

Compact

func Compact(buf *bytes.Buffer, src []byte, escape bool) error

ErrMarshalerWithCode

func ErrMarshalerWithCode(code *Opcode, err error) *errors.MarshalerError

ErrUnsupportedFloat

func ErrUnsupportedFloat(v float64) *errors.UnsupportedValueError

ErrUnsupportedValue

func ErrUnsupportedValue(code *Opcode, ptr uintptr) *errors.UnsupportedValueError

Indent

func Indent(buf *bytes.Buffer, src []byte, prefix, indentStr string) error

IsNilForMarshaler

func IsNilForMarshaler(v interface{}) bool

Load

func Load(base uintptr, idx uintptr) uintptr

LoadNPtr

func LoadNPtr(base uintptr, idx uintptr, ptrNum int) uintptr

MapIterInit

func MapIterInit(mapType *runtime.Type, m unsafe.Pointer, it *mapIter)

MapIterKey

func MapIterKey(it *mapIter) unsafe.Pointer

MapIterNext

func MapIterNext(it *mapIter)

MapIterValue

func MapIterValue(it *mapIter) unsafe.Pointer

MapLen

func MapLen(m unsafe.Pointer) int

PtrToBool

func PtrToBool(p uintptr) bool

PtrToBytes

func PtrToBytes(p uintptr) []byte

PtrToFloat32

func PtrToFloat32(p uintptr) float32

PtrToFloat64

func PtrToFloat64(p uintptr) float64

PtrToInterface

func PtrToInterface(code *Opcode, p uintptr) interface{}

PtrToNPtr

func PtrToNPtr(p uintptr, ptrNum int) uintptr

PtrToNumber

func PtrToNumber(p uintptr) json.Number
Showing entries 1–40 of 173. Use Contents to jump to any section or symbol.

Dependency graph