Struct strason::Json[][src]

pub struct Json(_);

A "stringly-typed" Json object. That is, either a value (represented as a String), or an object (represented as a map from Strings to Jsons).

Methods

impl Json
[src]

Construct a Json object by parsing a byte iterator, e.g. from a Reader

Construct a Json object by parsing a string

Construct a Json object from a reader

Converts something serializable to a Json object

Returns a null, if this is a null

Returns the value, if this is a boolean

Returns the value, if this is a number

Returns the value, if this is a string

Returns the value, if this is an array

Returns the value, if this is an object

Obtain a reference to a specified member, if this is an object

Return the number of subobjects this object represents (so a count for Arrays and Objects). NOT a string length.

Return whether the object is empty, if it is a collection

Reserialize the object into a writer

Serialize the object to byte array

Convert the Json object to something deserializable

Trait Implementations

impl<'de> Deserialize<'de> for Json
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Json
[src]

Serialize this value into the given Serde serializer. Read more

impl Clone for Json
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Json
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Json
[src]

impl Debug for Json
[src]

Formats the value using the given formatter. Read more

impl From<()> for Json
[src]

Performs the conversion.

impl From<bool> for Json
[src]

Performs the conversion.

impl From<usize> for Json
[src]

Performs the conversion.

impl From<u64> for Json
[src]

Performs the conversion.

impl From<u32> for Json
[src]

Performs the conversion.

impl From<u16> for Json
[src]

Performs the conversion.

impl From<u8> for Json
[src]

Performs the conversion.

impl From<isize> for Json
[src]

Performs the conversion.

impl From<i64> for Json
[src]

Performs the conversion.

impl From<i32> for Json
[src]

Performs the conversion.

impl From<i16> for Json
[src]

Performs the conversion.

impl From<i8> for Json
[src]

Performs the conversion.

impl From<f64> for Json
[src]

Performs the conversion.

impl From<f32> for Json
[src]

Performs the conversion.

impl From<String> for Json
[src]

Performs the conversion.

impl<'a> From<&'a str> for Json
[src]

Performs the conversion.

impl From<Vec<Json>> for Json
[src]

Performs the conversion.

impl From<Vec<(String, Json)>> for Json
[src]

Performs the conversion.

impl Display for Json
[src]

Formats the value using the given formatter. Read more

impl<'a> Index<&'a str> for Json
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl Index<usize> for Json
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl Index<Range<usize>> for Json
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl Index<RangeTo<usize>> for Json
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl Index<RangeFrom<usize>> for Json
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl Index<RangeFull> for Json
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

Auto Trait Implementations

impl Send for Json

impl Sync for Json