MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Build

Method Build

pkg/util/json/json.go:454–463  ·  view source on GitHub ↗

Build builds JSON object.

()

Source from the content-addressed store, hash-verified

452
453// Build builds JSON object.
454func (b *FixedKeysObjectBuilder) Build() (JSON, error) {
455 if b.updated.Len() != len(b.pairs) {
456 return nil, errors.AssertionFailedf(
457 "expected all %d keys to be updated, %d updated",
458 len(b.pairs), b.updated.Len())
459 }
460 b.updated = intsets.Fast{}
461 // Must copy b.pairs in case builder is reused.
462 return jsonObject(append([]jsonKeyValuePair(nil), b.pairs...)), nil
463}
464
465// PartialObject is a JSON object builder that builds an object using a set of
466// fixed key-values (supplied at construction) and a set of keys which are

Callers

nothing calls this directly

Calls 2

jsonObjectTypeAlias · 0.85
LenMethod · 0.65

Tested by

no test coverage detected