You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-07-12 23:50:19 +02:00
#197 fix place holder encoder to use EncodeInterface, WriteToStream is unsafe when the real encoder is unknown
This commit is contained in:
@ -164,7 +164,7 @@ func (encoder *placeholderEncoder) Encode(ptr unsafe.Pointer, stream *Stream) {
|
||||
}
|
||||
|
||||
func (encoder *placeholderEncoder) EncodeInterface(val interface{}, stream *Stream) {
|
||||
WriteToStream(val, stream, encoder)
|
||||
encoder.getRealEncoder().EncodeInterface(val, stream)
|
||||
}
|
||||
|
||||
func (encoder *placeholderEncoder) IsEmpty(ptr unsafe.Pointer) bool {
|
||||
|
Reference in New Issue
Block a user