MCPcopy Create free account
hub / github.com/pydantic/jiter / parse_array

Method parse_array

crates/jiter/src/python.rs:174–187  ·  view source on GitHub ↗
(
        &mut self,
        py: Python<'py>,
        peek_first: Peek,
        vec: &mut SmallVec<[Bound<'py, PyAny>; 8]>,
    )

Source from the content-addressed store, hash-verified

172 }
173
174 fn parse_array<'py>(
175 &mut self,
176 py: Python<'py>,
177 peek_first: Peek,
178 vec: &mut SmallVec<[Bound<'py, PyAny>; 8]>,
179 ) -> JsonResult<()> {
180 let v = self.check_take_value(py, peek_first)?;
181 vec.push(v);
182 while let Some(peek) = self.parser.array_step()? {
183 let v = self.check_take_value(py, peek)?;
184 vec.push(v);
185 }
186 Ok(())
187 }
188
189 fn parse_object<'py>(&mut self, py: Python<'py>, dict: &Bound<'py, PyDict>) -> JsonResult<()> {
190 let set_item = |key: Bound<'py, PyString>, value: Bound<'py, PyAny>| {

Callers 1

py_take_valueMethod · 0.80

Calls 2

check_take_valueMethod · 0.80
array_stepMethod · 0.45

Tested by

no test coverage detected