You have various options, depending on what you want to achieve:
- Added a property of type %DynamicObject or %DynamicArray to a persistent class
- Store the JSON content in the Document Data Model
- Parse a JSON structure as Eduard indicated and generate the corresponding persistent class(es).
- I would not advise to use %Document.Object. Use the Document Model instead.
With option 1) and 2) you don't need to define a schema at all, but can easily persist and manage your JSON content as objects. No SQL access to individual properties of the JSON content for option 1). With the document data model you can add support for SQL queries for individual JSON paths.
Option 3) is work, but doable. Figuring out the correct datatypes will be the greatest challenge. If you have JSON schema instead, your life is much simpler.