Struct serde_json::builder::ArrayBuilder
[−]
[src]
pub struct ArrayBuilder { // some fields omitted }
This structure provides a simple interface for constructing a JSON array.
Methods
impl ArrayBuilder
fn new() -> ArrayBuilder
Construct an ObjectBuilder
.
fn unwrap(self) -> Value
Return the constructed Value
.
fn push<T: Serialize>(self, v: T) -> ArrayBuilder
Insert a value into the array.
fn push_array<F>(self, f: F) -> ArrayBuilder where F: FnOnce(ArrayBuilder) -> ArrayBuilder
Creates and passes an ArrayBuilder
into a closure, then inserts the resulting array into
this array.
fn push_object<F>(self, f: F) -> ArrayBuilder where F: FnOnce(ObjectBuilder) -> ObjectBuilder
Creates and passes an ArrayBuilder
into a closure, then inserts the resulting object into
this array.