Update Rust crate serde_json to ~1.0.94
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
serde_json | dependencies | patch |
~1.0 -> ~1.0.94
|
Release Notes
serde-rs/json
v1.0.94
v1.0.93
- Support 128-bit integers in serde_json::to_value (#982)
v1.0.92
- Documentation improvements
v1.0.91
- Opt out of
-Zrustdoc-scrape-examples
on docs.rs for now
v1.0.90
- Documentation improvements
v1.0.89
- Fix invalid JSON incorrectly accepted when a large number has no digits after decimal point (#953)
v1.0.88
- Optimize serde_json::Map's implementation of
append
andclone_from
(#952, thanks @Lucretiel)
v1.0.87
- Add
write_i128
andwrite_u128
methods toserde_json::Formatter
to control the formatting of 128-bit integers (#940, thanks @Lucretiel)
v1.0.86
- Support
arbitrary_precision
feature even in no-std mode (#928, thanks @kvinwang)
v1.0.85
- Make
Display
forNumber
produce the same representation as serializing (#919)
v1.0.84
- Make
Debug
impl ofserde_json::Value
more compact (#918)
v1.0.83
- Add categories to crates.io metadata
v1.0.82
- Implement
From<Option<T>>
for serde_json::Value whereT: Into<Value>
(#900, thanks @kvnvelasco)
v1.0.81
- Work around
indexmap
/autocfg
not always properly detecting whether astd
sysroot crate is available (#885, thanks @cuviper)
v1.0.80
- Documentation improvements
v1.0.79
- Allow
RawValue
deserialization to propagate\u
escapes for unmatched surrogates, which can later by deserialized to Vec<u8> (#830, thanks @lucacasonato)
v1.0.78
- Support deserializing as
&RawValue
in map key position, which would previously fail with "invalid type: newtype struct" (#851)
v1.0.77
- Include discord invite links in the published readme
- Improve compile error on compiling with neither
std
noralloc
feature enabled - Include integration tests in published package (#578)
v1.0.76
- Fix a build error when features
raw_value
andalloc
are enabled whilestd
is disabled (#850)
v1.0.75
- Fix deserialization of small integers in arbitrary_precision mode (#845)
v1.0.74
v1.0.73
- Update
itoa
dependency to 1.0
v1.0.72
- Interpret
\u
-encoded lone surrogates when deserializing into a byte string (#828, #829, thanks @lucacasonato)
v1.0.71
- Add serde_json::Map::get_key_value (#821, thanks @timothee-haudebourg)
- Add impl From<Box<RawValue>> for Box<str> (#824, thanks @jplatte)
v1.0.70
- Add
serde_json::Map::retain
method (#822, thanks @deankarn)
v1.0.69
- Implement Hash for serde_json::Number (#814, thanks @timothee-haudebourg)
v1.0.68
v1.0.67
- Fix inconsistency of deserialization of unknown fields in a struct variant from bytes vs from Value (#795)
v1.0.66
- Preserve exponent signifier and unary plus in exponent of arbitrary_precision numbers (#786, thanks @ruifengx)
v1.0.65
- Documentation improvements
v1.0.64
- Fix deserialization panic on deserializing
RawValue
from a slice containing non-utf8 bytes (#755)
v1.0.63
- Provide
Entry::and_modify
method on serde_json::map::Entry (#754, thanks @Krout0n)
v1.0.62
- Speed up Display impl of serde_json::Value by 33% (#751, thanks @icewind1991)
v1.0.61
v1.0.60
- Add
impl FromIterator<(impl Into<String>, impl Into<Value>)> for Value
, which collects a Value::Object (#733, thanks @matklad)
v1.0.59
- In arbitrary_precision mode, return None from serde_json::Number::as_f64 if the JSON number is larger than the maximum possible f64
v1.0.58
- Add serde_json::Map::remove_entry, matching the equivalent API on BTreeMap
v1.0.57
- Allow serde_json::Deserializer to be instantiated without consuming the serde_json::de::Read impl (#684)
v1.0.56
- Improve compiler diagnostic on missing commas inside
json!
macro invocation (https://github.com/rust-lang/rust/issues/73777)
v1.0.55
- Fix missing build script required for using
float_roundtrip
(https://github.com/serde-rs/json/releases/tag/v1.0.54)
v1.0.54
-
Add
float_roundtrip
feature to enable a slower but higher precision float parser based on lexical.Enabling
float_roundtrip
will use sufficient precision when parsing fixed precision floats from JSON to ensure that they maintain accuracy when round-tripped through JSON. This comes at an approximately 2x performance cost for parsing floats compared to the default best-effort precision.Unlike
arbitrary_precision
, the newfloat_roundtrip
feature makes f64 -> JSON -> f64 produce output identical to the input.arbitrary_precision
is for making JSON -> serde_json::Number -> JSON produce output identical to the input.serde_json = { version = "1.0.54", features = ["float_roundtrip"] }
v1.0.53
- Reduce unhelpful indentation in the {:#?} format of serde_json::Value
- Remove some unnecessary runtime checks from Serializer::collect_str
v1.0.52
- Add serde_json::value::to_raw_value to convert a serializable value to Box<RawValue> (#658, thanks @jplatte)
v1.0.51
- Terminate StreamDeserializer after errors instead of repeatedly reparsing the same failed input (#647)
- Add FusedIterator impls for StreamDeserializer and for Map's various iterators
v1.0.50
- Implement Eq for Value, Map, Number (#640, thanks @smarnach)
v1.0.49
- Improve error message when neither "std" nor "alloc" feature is enabled (#643)
v1.0.48
- Add
serde_json::value::Serializer
which produces aValue
as output (#621, thanks @sdleffler)
v1.0.47
v1.0.46
- Serialize JSON map entries using serialize_entry instead of serialize_key + serialize_value to support transcoding to XML (#614, thanks @jmfiaschi)
v1.0.45
-
Add no-std support (#606, thanks @Xanewok)
[dependencies] serde_json = { version = "1.0.45", default-features = false, features = ["alloc"] }
v1.0.44
- Implement IntoDeserializer for serde_json::Value to allow deserializing from types like
HashMap<String, Value>
(#591)
v1.0.43
- Declare accurate minimum required version of indexmap crate when preserve-order feature is enabled (#590, thanks @nlordell)
v1.0.42
- Add
impl From<()> for Value
which produces Value::Null (#585, thanks @Nilix007)
v1.0.41
v1.0.40
v1.0.39
- Fix roundtrip of adjacently tagged enum containing f32 (#520)
v1.0.38
- Add
Deserializer::disable_recursion_limit
guarded by an"unbounded_depth"
Cargo cfg; this allows parsing arbitrarily deep JSON structures without any consideration for overflowing the stack; see documentation in the link for how to do this safely (#509)
v1.0.37
-
Work around a compounding error message bug when using serde_json in combination with erased-serde (https://github.com/dtolnay/erased-serde/issues/21) that resulted in error messages like:
"trailing comma at line 32 column 41 at line 32 column 41 at line 33 column 37 at line 34 column 33 at line 35 column 29 at line 36 column 25 at line 36 column 25 at line 36 column 25 at line 36 column 25"
v1.0.36
- Fix serialization of maps with u128 key (#511)
v1.0.35
- Update example code in documentation to 2018 edition
v1.0.34
- Support serialization of i128 to Value if
"arbitrary_precision"
feature is enabled (#506, thanks @koushiro)
v1.0.33
- Allow map key to be borrowed when deserializing from
&Value
(#503)
v1.0.32
- Fix panic when parsing floating point number with exponent of
E-2147483647
in debug mode (#492)
v1.0.31
v1.0.30
- Implement parsing of
IgnoredAny
andRawValue
without recursion (#486)
v1.0.29
- Provide a
RawValue
type which represents a contiguous range of bytes in the input corresponding to one JSON value without parsing that value into any particular data structure (#355)
v1.0.28
- Performance improvement for calls to serde_json::from_str in which the input does not contain JSON escape sequences (#482)
v1.0.27
- Fix a warning when building docs under Rust 2018 with serde_json as a dependency (#476, thanks @Enet4)
v1.0.26
- Switch from
dtoa
toryu
crate for 60% higher throughput serializing floating point data (#472, benchmark)
v1.0.25
v1.0.24
- Make
json!
macro compatible with using thedeny(unused_results)
lint (#461)
v1.0.23
(yanked)
v1.0.22
- Fix error category when deserialization fails in a truncated
null
(#454)
v1.0.21
- Allow serializing a map with char keys (#453, thanks @fdionisi)
v1.0.20
- Switch to
indexmap
as the implementation of the"preserver_order"
feature, aslinked-hash-map
is no longer maintained (#451, thanks @lnicola)
v1.0.19
- Pick up Serde's workaround to get documentation building on docs.rs (https://github.com/serde-rs/serde/issues/1295)
v1.0.18
- Support serializing and deserializing 128-bit integers (#448)
v1.0.17
- Consistent meaning of
serde_json::Value
equality whether or not"preserve_order"
feature is enabled (#438, thanks @Diggsey)
v1.0.16
- Add
values_mut()
iterator for serde_json::Map (#437)
v1.0.15
- Make treatment of deserializer hints by
serde_json::from_value
consistent withserde_json::from_str
v1.0.14
- Clearer Debug representation of serde_json::Error (#410)
v1.0.13
- Add an
arbitrary_precision
feature which allows the serialization and deserialization of serde_json::Number to operate on data of arbitrary size/precision, rather than just fixed-width primitive integer and floating point types (#416, thanks @alexreg)
v1.0.12
(dependency bump only)
v1.0.11
- Add a method
Value::take
similar to the method of the same name onOption
(#421, thanks @dmizuk)
v1.0.10
- Improve error when a JSON string contains control character (#414, thanks @boxofrox)
v1.0.9
- Hide implementation details of serde_json::Number from the Debug representation
v1.0.8
- Significant improvements to compile time of
derive(Deserialize)
generated code using JSON; see Improve compile time and executable size by counting lines of LLVM IR - Fix typo in error message when deserializing something that is not a boolean and the input contains
false
(#392, thanks @bouk)
Compatibility notes
Part of the improvement to compile time comes from having generic methods in serde_json instantiate many fewer Visitor trait methods than they used to. For example if a Deserialize impl is being deserialized from JSON and the impl indicates to Serde that the type u64 is expected, serde_json can avoid instantiating all of the Visitor methods that deal with string, borrowed string, unit, sequence, map, boolean, char, bytes, borrowed bytes, option, newtype, and enum. Previously all of these methods were instantiated and compile times were predictably poor in consequence. As of this release, serde_json instantiates only the expected Visitor methods and instead renders invalid_type error messages in a central place in the Deserializer that can be instantiated just once. This does not apply to deserialize_any for which it continues to be necessary to instantiate every Visitor method.
This does mean that code relying on the deserialize hint to be wrong may no longer deserialize successfully.
impl<'de> Deserialize<'de> for MyType {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>
{
struct MyVisitor;
impl<'de> Visitor<'de> for MyVisitor {
type Value = MyType;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str("a string, although we ask the deserializer for u64")
}
fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
where E: de::Error
{
Ok(/* ... */)
}
}
// It used to be that serde_json would ignore this hint and call visit_str
// for string input, but in the general case that destroys compile times
// by instantiating far more Visitor methods than are ever used.
deserializer.deserialize_u64(MyVisitor)
}
}
v1.0.7
v1.0.6
- Bump optional linked-hash-map dependency to version 0.5 (#382, thanks @ignatenkobrain)
v1.0.5
- Documentation improvements
v1.0.4
- Improve error message for an array or object containing a trailing comma, which is not allowed in JSON (#353, thanks @fmoor)
v1.0.3
- Performance improvement for parsing ignored data (#174)
- Implement PartialEq<bool> for Value (#338, thanks @foriequal0)
v1.0.2
- Improve compile time by 15% (#314, thanks @Rufflewind)
v1.0.1
-
Fix deserialization of maps with non-string keys (#311)
For example
{"1":"one"}
can be serialized and deserialized asBTreeMap<i32, String>
.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.