diff options
Diffstat (limited to 'encode.go')
-rw-r--r-- | encode.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -16,6 +16,8 @@ import ( "strconv" "strings" "unsafe" + + "git.lukeshu.com/go/lowmemjson/internal/jsonstruct" ) // Encodable is the interface implemented by types that can encode @@ -299,7 +301,7 @@ func encode(w *ReEncoder, val reflect.Value, escaper BackslashEscaper, quote boo return err } empty := true - for _, field := range indexStruct(val.Type()).byPos { + for _, field := range jsonstruct.IndexStruct(val.Type()).ByPos { fVal, err := val.FieldByIndexErr(field.Path) if err != nil { continue |