You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-21 23:07:33 +02:00
move type declaration into separate files
This commit is contained in:
@ -8,6 +8,11 @@ import (
|
||||
"reflect"
|
||||
)
|
||||
|
||||
var marshalerType = reflect.TypeOf((*json.Marshaler)(nil)).Elem()
|
||||
var unmarshalerType = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem()
|
||||
var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
|
||||
var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
|
||||
|
||||
func createDecoderOfMarshaler(cfg *frozenConfig, prefix string, typ reflect.Type) ValDecoder {
|
||||
ptrType := reflect.PtrTo(typ)
|
||||
if ptrType.Implements(unmarshalerType) {
|
||||
|
Reference in New Issue
Block a user