Skip to content

Commit

Permalink
make Json::from_bytes public
Browse files Browse the repository at this point in the history
  • Loading branch information
waynr committed Sep 29, 2023
1 parent ceab243 commit 86cf7e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion axum/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ where
/// or otherwise preserve the exact byte representation of the request while also interrogating
/// it for metadata that may be useful in determining exactly what to do with the preserved
/// bytes.
fn from_bytes(bytes: &Bytes) -> Result<Self, JsonRejection> {
pub fn from_bytes(bytes: &Bytes) -> Result<Self, JsonRejection> {
let deserializer = &mut serde_json::Deserializer::from_slice(&bytes);

let value = match serde_path_to_error::deserialize(deserializer) {
Expand Down

0 comments on commit 86cf7e0

Please sign in to comment.