Ability to distinguish between a supplied null value and a mising field #207
Unanswered
threesquared
asked this question in
Q&A
Replies: 1 comment
-
If I remember correctly (not near my laptop now to check), you need a double pointer ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given a Struct like this:
If I send something like
{"otherval":null}
it passes validation as the values are not required and nullable but then my decoded input I just get{Val:<nil> OtherVal:<nil>}
and it seems there is there is no way to work out if the value was omitted from the request or actually provided but asnull
I want to be able to make this distinction in an update PATCH request so I know if the user wants to set the value to null or leave it as is.
Beta Was this translation helpful? Give feedback.
All reactions