v4.1.0
rbs
crates removed enum typeExt
. This change is mainly for json specification compatibility, so special types such asDateTime
will be serialized to map types such as{"type":"DateTime","value":"2023-01-01 00:00:00.000001"}
rbs::Value
call.to_string()
will be return json stringrbdc::types
change frompub struct Decimal(String)
topub struct Decimal { pub r#type: String, pub value: String, }
rbdc::types
Display and Format change fromDecimal("1.0000")
to Display Value"1.0000"
. source value is{"type":"Decimal","value":"1.0000"}
- Macro to_value enhanced to support defining map types. for example:
let v = rbs::to_value! {};
let m = rbs::to_value! {
1: 1,
"2": 2,
};
assert_eq!(r#"{1:1,"2":2}"#, m.to_string());