MCPcopy Create free account
hub / github.com/dprint/jsonc-parser / object_value

Method object_value

src/cst/mod.rs:1211–1213  ·  view source on GitHub ↗

Gets the root value if its an object.

(&self)

Source from the content-addressed store, hash-verified

1209
1210 /// Gets the root value if its an object.
1211 pub fn object_value(&self) -> Option<CstObject> {
1212 self.value()?.as_object()
1213 }
1214
1215 /// Gets or creates the root value as an object, returns `Some` if successful
1216 /// or `None` if the root value already exists and is not an object.

Callers 5

object_value_or_setMethod · 0.80
property_indexFunction · 0.80

Calls 3

valueMethod · 0.80
as_objectMethod · 0.45
getMethod · 0.45

Tested by 3

property_indexFunction · 0.64