mirror of https://github.com/goccy/go-json.git
38 lines
588 B
Go
38 lines
588 B
Go
package encoder
|
|
|
|
type OptionFlag uint8
|
|
|
|
const (
|
|
HTMLEscapeOption OptionFlag = 1 << iota
|
|
IndentOption
|
|
UnorderedMapOption
|
|
DebugOption
|
|
ColorizeOption
|
|
)
|
|
|
|
type Option struct {
|
|
Flag OptionFlag
|
|
ColorScheme *ColorScheme
|
|
}
|
|
|
|
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
|
|
)
|