Why is this json schema invalid? using "any" type

From json-schema.org documentation, we find this regarding "type" property:

If it is an array, it must be an array of strings, where each string is the name of one of the basic types, and each element is unique. In this case, the JSON snippet is valid if it matches any of the given types.

So, another way to achieve a sort of "any" type, you might include all json types:

"type":["number","string","boolean","object","array", "null"]

This is because any is no longer a valid value for the type keyword.

If you want a schema which matches everything, just use the empty schema: {}.

Tags:

Jsonschema