MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / obj

Method obj

native/watchos/src/models.rs:624–642  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

622 }
623 }
624 fn obj(&mut self) -> Option<JVal> {
625 if self.bump() != Some(b'{') { return None; }
626 let mut kv = Vec::new();
627 loop {
628 self.skip_ws();
629 match self.peek()? {
630 b'}' => { self.bump(); return Some(JVal::Obj(kv)); }
631 b',' => { self.bump(); continue; }
632 b'"' => {
633 let key = self.string()?;
634 self.skip_ws();
635 if self.bump() != Some(b':') { return None; }
636 let v = self.val()?;
637 kv.push((key, v));
638 }
639 _ => return None,
640 }
641 }
642 }
643 fn arr(&mut self) -> Option<JVal> {
644 if self.bump() != Some(b'[') { return None; }
645 let mut items = Vec::new();

Callers 1

valMethod · 0.80

Calls 6

bumpMethod · 0.80
skip_wsMethod · 0.80
peekMethod · 0.80
stringMethod · 0.80
valMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected