- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ObjectAsKVS (0.06 sec)
-
internal/s3select/jstream/decoder.go
d.emitDepth = 0 d.emitRecursive = true } return d } // ObjectAsKVS - by default JSON returns map[string]interface{} this // is usually fine in most cases, but when you need to preserve the // input order its not a right data structure. To preserve input // order please use this option. func (d *Decoder) ObjectAsKVS() *Decoder { d.objectAsKVS = true return d }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 13.5K bytes - Viewed (0) -
internal/s3select/sql/jsonpath_test.go
"testing" "github.com/alecthomas/participle" "github.com/minio/minio/internal/s3select/jstream" ) func getJSONStructs(b []byte) ([]interface{}, error) { dec := jstream.NewDecoder(bytes.NewBuffer(b), 0).ObjectAsKVS().MaxDepth(100) var result []interface{} for parsedVal := range dec.Stream() { result = append(result, parsedVal.Value) } if err := dec.Err(); err != nil { return nil, err } return result, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 2.8K bytes - Viewed (0) -
internal/s3select/json/reader.go
func NewReader(readCloser io.ReadCloser, args *ReaderArgs) *Reader { readCloser = &syncReadCloser{rc: readCloser} d := jstream.NewDecoder(io.LimitReader(readCloser, maxDocumentSize), 0).ObjectAsKVS().MaxDepth(100) return &Reader{ args: args, decoder: d, valueCh: d.Stream(), readCloser: readCloser, } } // syncReadCloser will wrap a readcloser and make it safe to call Close while
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.2K bytes - Viewed (0) -
cmd/postpolicyform.go
// keys, so we need to use this technique to merge the // keys. func sanitizePolicy(r io.Reader) (io.Reader, error) { var buf bytes.Buffer e := json.NewEncoder(&buf) d := jstream.NewDecoder(r, 0).ObjectAsKVS().MaxDepth(10) sset := set.NewStringSet() for mv := range d.Stream() { var kvs jstream.KVS if mv.ValueType == jstream.Object { // This is a JSON object type (that preserves key order)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 12.4K bytes - Viewed (0) -
internal/s3select/json/preader.go
continue } dst, ok := r.kvDstPool.Get().([]jstream.KVS) if !ok { dst = make([]jstream.KVS, 0, 1000) } d := jstream.NewDecoder(bytes.NewBuffer(in.input), 0).ObjectAsKVS().MaxDepth(100) stream := d.Stream() all := dst[:0] for mv := range stream { var kvs jstream.KVS if mv.ValueType == jstream.Object { // This is a JSON object type (that preserves key
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0)