qrz/vendor/github.com/goccy/go-json/internal/encoder/option.go

44 lines
689 B
Go
Raw Normal View History

2021-08-30 19:45:06 +02:00
package encoder
import "context"
type OptionFlag uint8
const (
HTMLEscapeOption OptionFlag = 1 << iota
IndentOption
UnorderedMapOption
DebugOption
ColorizeOption
ContextOption
2022-03-26 12:13:52 +01:00
NormalizeUTF8Option
FieldQueryOption
2021-08-30 19:45:06 +02:00
)
type Option struct {
Flag OptionFlag
ColorScheme *ColorScheme
Context context.Context
}
type EncodeFormat struct {
Header string
Footer string
}
type EncodeFormatScheme struct {
Int EncodeFormat
Uint EncodeFormat
Float EncodeFormat
Bool EncodeFormat
String EncodeFormat
Binary EncodeFormat
ObjectKey EncodeFormat
Null EncodeFormat
}
type (
ColorScheme = EncodeFormatScheme
ColorFormat = EncodeFormat
)