You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
support []byte; marshal without copy
This commit is contained in:
@ -45,6 +45,7 @@ func Test_customize_type_encoder(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_customize_byte_array_encoder(t *testing.T) {
|
||||
CleanEncoders()
|
||||
should := require.New(t)
|
||||
RegisterTypeEncoder("[]uint8", func(ptr unsafe.Pointer, stream *Stream) {
|
||||
t := *((*[]byte)(ptr))
|
||||
|
Reference in New Issue
Block a user