You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
Chucking this up here for discussion, maybe this isn't the tool to do this but we've noticed people slipping bad JSON into the body of a HTTP payload. It's mostly undetected until you try and connect with a client and notice it fails to deserialise the JSON. Would be good to catch this early with the validator.
For example, here's a bad JSON body (notice the trailing ,):
+ Body
{ "message": "Hello", }
Known types:
JSON/JavaScript
XML
YAML
The text was updated successfully, but these errors were encountered:
This is a good point @kylef however the current behavior is intentional to allow stubbing payloads (JSONs, XML) for example in the moment you are designing your API and can't be bothered by well formatting JSONs:
+ body
{ ... }
So I was thinking about parser, or perhaps more preferably, parser harness flag to switch the validation on and off.
I am closing this issue as Snow Crash by itself should not provide any sort of payload validation – this is either task for subsequent tooling or the parser harness in the pipeline.
Chucking this up here for discussion, maybe this isn't the tool to do this but we've noticed people slipping bad JSON into the body of a HTTP payload. It's mostly undetected until you try and connect with a client and notice it fails to deserialise the JSON. Would be good to catch this early with the validator.
For example, here's a bad JSON body (notice the trailing
,
):Known types:
The text was updated successfully, but these errors were encountered: