Skip to content

feat: Handle json.Number values#65

Open
elliotcourant wants to merge 1 commit intogoogle:mainfrom
elliotcourant:feature/handle-json-number
Open

feat: Handle json.Number values#65
elliotcourant wants to merge 1 commit intogoogle:mainfrom
elliotcourant:feature/handle-json-number

Conversation

@elliotcourant
Copy link

If a json.Number value is given to the schema to validate it will currently treat it as a "string" because of the underlying type. It might make more sense to check for this specific value and then handle it the same way you would handle a float64 that would have been received from the traditional json.Unmarshal for a numeric value.

If a json.Number value is given to the schema to validate it will
currently treat it as a "string" because of the underlying type. It
might make more sense to check for this specific value and then handle
it the same way you would handle a float64 that would have been received
from the traditional json.Unmarshal for a numeric value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant