Hello!
I've been dealing with this problem for about 2 days now, and the code solution I've come up with looks pretty awful and hacky. So, I was wondering if there was a better way to do this.
The Problem:
I need to accept some data that's being POST-ed to me and do stuff based on it, however the problem is how the data is arriving to me.
The actual data model is supposed to look like this: https://paste.rs/bvD.json
It's got JSON strings nested inside JSON strings.
When this gets POST-ed to me, Axum gets the data in the form of a byte string that looks like this: https://paste.rs/Tpj
What I've Tried So Far:
This is a small snippet of what my current code looks like: https://paste.rs/nhN.rs
It kinda works, but even I can tell that it's probably not a good way to go about this.
So, I was wondering:
- Is there a better way for me to wrangle that input data?
- If no, is there a better way for me to structure my code?