MCPcopy
hub / github.com/tidwall/sjson / SetRawOptions

Function SetRawOptions

sjson.go:464–474  ·  view source on GitHub ↗

SetRawOptions sets a raw json value for the specified path with options. This furnction works the same as SetOptions except that the value is set as a raw block of json. This allows for setting premarshalled json objects.

(json, path, value string, opts *Options)

Source from the content-addressed store, hash-verified

462// This furnction works the same as SetOptions except that the value is set
463// as a raw block of json. This allows for setting premarshalled json objects.
464func SetRawOptions(json, path, value string, opts *Options) (string, error) {
465 var optimistic bool
466 if opts != nil {
467 optimistic = opts.Optimistic
468 }
469 res, err := set(json, path, value, false, false, optimistic, false)
470 if err == errNoChange {
471 return json, nil
472 }
473 return string(res), err
474}
475
476// SetRawBytes sets a raw json value for the specified path.
477// If working with bytes, this method preferred over

Callers 1

SetRawFunction · 0.85

Calls 1

setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…