I have JSON in a field, but I need to check it's schema before I process it. I need to know if anything has been added or removed from the schema.
Is there a way to extract the JSON schema from a JSON string so I can compare it to a known schema?
An online example is http://jsonschema.net/, but I want to do the same thing in TSQL
SQL Server don't support any json schema binding.
If your JSON is simple or flat, you can use
to find all keys on the first level and compare them with some expected key set.