Small example of how to work with JSON with persistence in PostgreSQL, has Schema validation and default values.
Uses Sequelize, Ajv and lodash.merge, check the folder example
to see how works.
This is just a set of libraries I joined to assist in migrating from NoSQL to Postgres databases, I felt the lack of validation of the existing JSON Schema in Mongoose and Ottoman.