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

Method array_value

src/cst/mod.rs:1246–1248  ·  view source on GitHub ↗

Gets the value if its an array.

(&self)

Source from the content-addressed store, hash-verified

1244
1245 /// Gets the value if its an array.
1246 pub fn array_value(&self) -> Option<CstArray> {
1247 self.value()?.as_array()
1248 }
1249
1250 /// Gets or creates the root value as an object, returns `Some` if successful
1251 /// or `None` if the root value already exists and is not an object.

Calls 3

valueMethod · 0.80
as_arrayMethod · 0.45
getMethod · 0.45