Struct json::decoder::Decoder [] [src]

pub struct Decoder<I: Iterator> { /* fields omitted */ }

JSON decoder over char iterators.

Methods

impl<I: Iterator<Item=char>> Decoder<I>
[src]

Create decoder with default Config.

Decode as generic Json but ignore the result.

Semantically this method is equivalent to Decoder::decode but potentially more efficient as it tries to avoid allocating intermediate values.

Decode a JSON string into the given Utf8Buffer.

If the actual string does not fit into the provided buffer and overflow_err is true, DecodeError::BufferOverflow is returned immediately. If overflow_err is false we continue decoding the string, but the buffer will only contain as much as fits into it.

Decode null (which is mapped to None) or some other JSON value (mapped to Some).

Decode non-empty JSON arrays.

Create a JSON array iterator to conveniently decode a homogenous array.

use json::Decoder;
let mut d = Decoder::default("[1,2,3,4]".chars());
let mut v = vec![];
for i in d.array_iter(Decoder::u8).unwrap() {
    v.push(i.unwrap())
}Run

Decode a JSON array element.

Decode non-empty JSON objects.

Decode a JSON object key.

Decode a JSON object key into the given buffer.

Decode a JSON object value.