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
I'm using the validator.js as the main validator of form in our company framework. Implementing tests for our component I discovered that the isJson validator doesn't accept the primitives JSON types as valid JSON if they are not encapsulated in an object. Trying to fix it I also discovered that the tests of the validator.js expect these values to be rejected.
Even if these types are not defined as valid types in the initial JSON RFC-4627, the RFC-7159 that obsolete the 4627 strictly defines the four primitives (strings, numbers, booleans, and null) as valid JSON types, making the following valid :
"null"
"true"
"false"
I noticed that "false" is also considered as an invalid JSON regarding the tests.
My question is: is there a good reason to make them invalid?
The text was updated successfully, but these errors were encountered:
Hi,
I'm using the validator.js as the main validator of form in our company framework. Implementing tests for our component I discovered that the
isJson
validator doesn't accept the primitives JSON types as valid JSON if they are not encapsulated in an object. Trying to fix it I also discovered that the tests of the validator.js expect these values to be rejected.Even if these types are not defined as valid types in the initial JSON RFC-4627, the RFC-7159 that obsolete the 4627 strictly defines the four primitives (strings, numbers, booleans, and null) as valid JSON types, making the following valid :
I noticed that "false" is also considered as an invalid JSON regarding the tests.
My question is: is there a good reason to make them invalid?
The text was updated successfully, but these errors were encountered: