Forward on parse Error in Json::from_data instead of failing #1830
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Since Rocket's JSON support is based on
Yes, I think this is more or less the same as issue #775. I explained the reason for this limitation in #775 (comment), along with a few potential solutions for the future. But, none of them will be ready for 0.5 - and they would likely require parsing the same data multiple times, making it a slower option than |
Beta Was this translation helpful? Give feedback.
Since Rocket's JSON support is based on
serde_json
, one way to accomplish a single route with multiple kinds of payload would be to use serde's support for several different enum representations to haveserde
determine which type to deserialize based on the data.Yes, I think this is more or less the same as issue #775. I explained the reason for this limitation in #775 (comment), along with a few potential solutions for the fut…