Bot releases are hidden (Show)
Published by maciejhirsz over 4 years ago
"key" => value
pair can be now written as either "key": value
or key: value
without quotes, as long as key
is an identifier.[foo]: value
.array!
or object!
from within another macro.null
is a keyword inside of either macro.Instead of:
let obj = object! {
"foo" => array![1, 2, json::Null],
"bar" => 42
};
You can now write:
let obj = object! {
foo: [1, 2, null],
bar: 42
};
Published by maciejhirsz over 4 years ago
Published by maciejhirsz almost 5 years ago
Published by maciejhirsz about 5 years ago
From<&[T]>
implementation for JsonValue
where T: Into<JsonValue>
(closes #160).object!
and array!
macros will no longer re-allocate (closes #159).object!
and array!
macros can be now used without being imported into local scope (by using json::object!
or json::array!
, thanks @matthias-t).HashMap
and BTreeMap
conversions are now more generic, working for any pair of K
key and V
value where K: AsRef<str>
and V: Into<JsonValue>
. This means that type inference won't always work in your favor, but should be much more flexible..collect()
an interator of (K, V)
(with bounds same as point above) into an Object
.Published by maciejhirsz over 6 years ago
Published by maciejhirsz almost 7 years ago
Published by maciejhirsz almost 7 years ago
#[must_use]
(#119).Object::override_last
, it was only public out of necessity before pub(crate)
was introduced.Published by maciejhirsz about 7 years ago
Thanks to @Yoric for contributions:
dump
and pretty
for Object
, see #131JsonValue
s are now equal even if one is a Short
while the other is a String
variant, see #126object!
macro now handles trailing commas, see #125Published by maciejhirsz about 7 years ago
Number
s created from parts are now automatically normalized, and print out expected values (Issue #114, thanks again @lpbak).Published by maciejhirsz over 7 years ago
Number
types with negative exponent but with large base, where putting the period after first digit would force the scientific e
notation to flip sign to positive (issue #108, thank you @lpbak)Published by maciejhirsz over 7 years ago
u16
(issue #107, thank you @lpbak)Published by maciejhirsz over 7 years ago
Published by maciejhirsz over 7 years ago
Object
struct now implements Index
and IndexMut
on it's own. Thanks to @hobofan for #105.Published by maciejhirsz almost 8 years ago
From<T> for JsonValue
to benefit from automatic conversions, the trait implementations are now using generics instead of macros internally (see #101).Published by maciejhirsz almost 8 years ago
Object
and thus JsonValue
lacked the Send
marker (#100).Published by maciejhirsz almost 8 years ago
Eq
to derived traits on the Error
type.Published by maciejhirsz almost 8 years ago
array_remove
to JsonValue
(see #98).Published by maciejhirsz almost 8 years ago
Error
enum now has a new variant: ExceededDepthLimit
.Error::ExceededDepthLimit
.Published by maciejhirsz almost 8 years ago
[1.]
).