Skip to content

v0.7.0

Compare
Choose a tag to compare
@bluk bluk released this 31 Jul 14:49
· 25 commits to trunk since this release
v0.7.0
1d99c9f

Added

  • Add Deserializer::byte_offset() to return the byte offset in the underlying source. It may be useful if there is trailing data.
  • Serialize and deserialize tuples and tuple structs.
  • Allow deserialization from a borrowed Value.
  • Set supported Rust version to 1.36.0. The MSRV is not guaranteed due to dependencies being free to bump their version.

Updated

  • In general, fewer allocations are made when parsing values.

  • Breaking change: Refactored the Read trait to allow borrowing against the original data.

    #[derive(Deserialize)]
    struct Info<'a> {
        name: Option<&'a str>,
        pieces: &'a [u8],
    }

    should work now when using from_slice.

  • Breaking change: Refactored the Error type.

    The Error::byte_offset() method can help hint where the error occurred at (usually only helpful for deserialization).

    Refactored to use Box to reduce the size of the return types. Rationale is
    influenced by Serde JSON issues/discussions where an allocation for an exceptional code path is acceptable.