Asymmetrical Deserialization and serialization of requests #153
Unanswered
YoavZinger17
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This is not a good support forum for usage questions. Please use one of:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Today I've encountered a problem when sending a request to my spring server to create an one property object.
I've opened a stack overflow question (link to question), but I think asking here can help.
The problem is, whenever I send a post/put request to my springboot server (either mvc or webflux), if I'm sending it with a json body as I expect, with curly brackets, and the key (name) of the property, I'm getting bat request response, but when sending the json body, with only the value (no key nor brackets), The server mange to receive the data.
for example -
Instead of sending:
{ "key":"value" }
I'm sending:
"value"
When getting the data back, the object is being serialized correctly and I'm getting the response as I'm expecting -
{ "key":"value" }
I tried to debug the different jackson classes to see if I catch where the value becomes the property of the object, but couldn't find anything.
The reason I'm asking here is because it happen both with spring mvc, and webflux, and I'm trying to find what common about them.
Thank you for help!
(attached is the demo I made myself to check and debug the problem)
demo - json.zip
Beta Was this translation helpful? Give feedback.
All reactions