postgres-json-schema allows validation of JSON schemas in PostgreSQL. It is implemented as a PL/pgSQL function and you can use it as a check constraint to validate the format of your JSON columns.
below is a use demo: Connect to SQL Server, create a table dbo.OrderDetail, and run some sql on this table.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results