- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 40 for NewEncoder (0.09 sec)
-
internal/store/queuestore.go
func (store *QueueStore[I]) multiWrite(key Key, items []I) (err error) { buf := bytebufferpool.Get() defer bytebufferpool.Put(buf) enc := jsoniter.ConfigCompatibleWithStandardLibrary.NewEncoder(buf) for i := range items { if err = enc.Encode(items[i]); err != nil { return err } } path := filepath.Join(store.directory, key.String()) if key.Compress {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
cmd/metrics-v3-handler.go
contentType := r.Header.Get("Content-Type") if contentType == "application/json" { w.Header().Set("Content-Type", "application/json") jsonEncoder := json.NewEncoder(w) jsonEncoder.Encode(metrics) return } // If not JSON, return plain text. We format it as a markdown table for // readability. w.Header().Set("Content-Type", "text/plain")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 15 16:28:02 UTC 2024 - 7.8K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ReaderInputStream.java
* @throws IllegalArgumentException if bufferSize is non-positive */ ReaderInputStream(Reader reader, Charset charset, int bufferSize) { this( reader, charset .newEncoder() .onMalformedInput(CodingErrorAction.REPLACE) .onUnmappableCharacter(CodingErrorAction.REPLACE), bufferSize); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 9.3K bytes - Viewed (0) -
guava/src/com/google/common/io/ReaderInputStream.java
* @throws IllegalArgumentException if bufferSize is non-positive */ ReaderInputStream(Reader reader, Charset charset, int bufferSize) { this( reader, charset .newEncoder() .onMalformedInput(CodingErrorAction.REPLACE) .onUnmappableCharacter(CodingErrorAction.REPLACE), bufferSize); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 9.3K bytes - Viewed (0) -
cmd/postpolicyform.go
// // Go stdlib doesn't support parsing JSON with duplicate // 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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 12.4K bytes - Viewed (0) -
istioctl/pkg/admin/istiodconfig.go
return nil, fmt.Errorf("cannot deserialize response %s", err) } return scopeInfos, nil } func (c *ControlzClient) PutScope(scope *ScopeInfo) error { var jsonScopeInfo bytes.Buffer err := json.NewEncoder(&jsonScopeInfo).Encode(scope) if err != nil { return fmt.Errorf("cannot serialize scope %+v", *scope) } req, err := http.NewRequest(http.MethodPut, c.baseURL.String()+"/"+scope.Name, &jsonScopeInfo)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Apr 13 05:23:38 UTC 2024 - 13.5K bytes - Viewed (0) -
docs/debugging/inspect/export.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 08 15:58:02 UTC 2022 - 9.1K bytes - Viewed (0) -
internal/grid/types.go
if j.val == nil { return msgp.AppendNil(b), nil } buf := bytes.NewBuffer(GetByteBuffer()[:0]) defer func() { PutByteBuffer(buf.Bytes()) }() enc := json.NewEncoder(buf) err = enc.Encode(j.val) if err != nil { return b, err } return msgp.AppendBytes(b, buf.Bytes()), nil } // UnmarshalMsg will JSON marshal the value and wrap as a msgp byte array.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 15.5K bytes - Viewed (0) -
cmd/admin-bucket-handlers.go
defer keepAliveTicker.Stop() diffCh, err := getReplicationDiff(ctx, objectAPI, bucket, opts) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } enc := json.NewEncoder(w) for { select { case entry, ok := <-diffCh: if !ok { return } if err := enc.Encode(entry); err != nil { return } if len(diffCh) == 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 28 15:32:18 UTC 2024 - 33.2K bytes - Viewed (0) -
cmd/metrics.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 16.6K bytes - Viewed (0)