Skip to content

Commit

Permalink
Allow to deserialize JSON Value types
Browse files Browse the repository at this point in the history
  • Loading branch information
zargony committed Oct 4, 2024
1 parent 8ad2dc5 commit 1bf12b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions firmware/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ impl FromJson for Vec<(String, Value)> {
// }
// }

impl FromJson for Value {
async fn from_json<R: BufRead>(reader: &mut Reader<R>) -> Result<Self, Error<R::Error>> {
reader.read_any().await
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 1bf12b2

Please sign in to comment.