Upgrade to serde-json-core v0.2.0
This also fixes the network interface for writing IIR coefficients.
This commit is contained in:
parent
16c986ab1b
commit
4130292706
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -915,9 +915,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde-json-core"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cbf406405ada9ef326ca78677324ac66994ff348fc48a16030be08caeed29825"
|
||||
checksum = "89fd6016a00149b485f66da701f76d909210d319040c97b6eff300f6e2ba2153"
|
||||
dependencies = [
|
||||
"heapless",
|
||||
"serde",
|
||||
|
@ -36,7 +36,7 @@ panic-semihosting = { version = "0.5", optional = true }
|
||||
panic-halt = "0.2"
|
||||
serde = { version = "1.0", features = ["derive"], default-features = false }
|
||||
heapless = { version = "0.5", features = ["serde"] }
|
||||
serde-json-core = "0.1"
|
||||
serde-json-core = "0.2"
|
||||
cortex-m-rtic = "0.5.5"
|
||||
embedded-hal = "0.2.4"
|
||||
nb = "1.0.0"
|
||||
|
@ -40,7 +40,7 @@ macro_rules! route_request {
|
||||
$(
|
||||
$write_attribute => {
|
||||
let new_value = match serde_json_core::from_str::<$TYPE>(&$request.value) {
|
||||
Ok(data) => data,
|
||||
Ok((data, _)) => data,
|
||||
Err(_) => return server::Response::error($request.attribute,
|
||||
"Failed to decode value"),
|
||||
};
|
||||
@ -253,7 +253,7 @@ impl Server {
|
||||
&self.data[..self.data.len() - 1],
|
||||
);
|
||||
match r {
|
||||
Ok(mut res) => {
|
||||
Ok((mut res, _)) => {
|
||||
// Note that serde_json_core doesn't escape quotations within a string.
|
||||
// To account for this, we manually translate all single quotes to
|
||||
// double quotes. This occurs because we doubly-serialize this field in
|
||||
|
Loading…
Reference in New Issue
Block a user