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

Method get

src/ast.rs:288–290  ·  view source on GitHub ↗

Gets a property value in the object by its name.

(&self, name: &str)

Source from the content-addressed store, hash-verified

286impl<'a> Object<'a> {
287 /// Gets a property value in the object by its name.
288 pub fn get(&self, name: &str) -> Option<&ObjectProp<'a>> {
289 self.properties.iter().find(|p| p.name.as_str() == name)
290 }
291
292 /// Gets a string property value from the object by name.
293 /// Returns `None` when not a string or it doesn't exist.

Callers 9

deserialize_tokenFunction · 0.45
tuple_variantMethod · 0.45
scanMethod · 0.45
parse_numberMethod · 0.45
parse_comment_lineMethod · 0.45
parse_comment_blockMethod · 0.45
skip_whitespaceMethod · 0.45
try_move_wordMethod · 0.45
current_charMethod · 0.45

Calls 2

iterMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected