Documentation
¶
Index ¶
Constants ¶
View Source
const Name = "json"
Name is the name registered for the json codec.
Variables ¶
View Source
var ( // MarshalOptions is a configurable JSON format marshaller. MarshalOptions = protojson.MarshalOptions{ EmitUnpopulated: true, } // UnmarshalOptions is a configurable JSON format parser. UnmarshalOptions = protojson.UnmarshalOptions{ DiscardUnknown: true, } )
Functions ¶
func GetJsonCodec ¶
Types ¶
type SpecialInterface ¶
type SpecialInterface interface {
GetSpecialData() []byte
}
SpecialInterface 非常直接的返回,不再Marshal,性能优先的时候使用
Click to show internal directories.
Click to hide internal directories.