summaryrefslogtreecommitdiff
path: root/vendor/github.com/goccy/go-json/internal/decoder/float.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/goccy/go-json/internal/decoder/float.go')
-rw-r--r--vendor/github.com/goccy/go-json/internal/decoder/float.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/goccy/go-json/internal/decoder/float.go b/vendor/github.com/goccy/go-json/internal/decoder/float.go
index dfb7168da..9b2eb8b35 100644
--- a/vendor/github.com/goccy/go-json/internal/decoder/float.go
+++ b/vendor/github.com/goccy/go-json/internal/decoder/float.go
@@ -156,3 +156,15 @@ func (d *floatDecoder) Decode(ctx *RuntimeContext, cursor, depth int64, p unsafe
d.op(p, f64)
return cursor, nil
}
+
+func (d *floatDecoder) DecodePath(ctx *RuntimeContext, cursor, depth int64) ([][]byte, int64, error) {
+ buf := ctx.Buf
+ bytes, c, err := d.decodeByte(buf, cursor)
+ if err != nil {
+ return nil, 0, err
+ }
+ if bytes == nil {
+ return [][]byte{nullbytes}, c, nil
+ }
+ return [][]byte{bytes}, c, nil
+}