pub struct Json;
Available on crate feature
serde
only.Expand description
JSON codec.
See serde_json for details.
When using this with data the contains maps with non-string keys you will need to apply attributes from map to work correctly.
Trait Implementations§
source§impl Codec for Json
impl Codec for Json
source§fn serialize<Writer, Item>(
writer: Writer,
item: &Item
) -> Result<(), SerializationError>
fn serialize<Writer, Item>( writer: Writer, item: &Item ) -> Result<(), SerializationError>
Serializes the specified item into the data format.
source§fn deserialize<Reader, Item>(
reader: Reader
) -> Result<Item, DeserializationError>where
Reader: Read,
Item: DeserializeOwned,
fn deserialize<Reader, Item>(
reader: Reader
) -> Result<Item, DeserializationError>where
Reader: Read,
Item: DeserializeOwned,
Deserializes the specified data into an item.
source§impl<'de> Deserialize<'de> for Json
impl<'de> Deserialize<'de> for Json
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Json
impl RefUnwindSafe for Json
impl Send for Json
impl Sync for Json
impl Unpin for Json
impl UnwindSafe for Json
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more