Customizing the JSON Tab

From ER/Studio Data Architect
Jump to: navigation, search

You can customize what items appear on the JSON tab of the Editor. These settings apply to all objects.

192 Object Editor JSON Tab.png

Under the Collection tab you can select which collections from your model that you want to add to your JSON file.

Use the Generation Options to select how you want your JSON output to appear.

Output as JSON Instance must be selected to use the JSON Instance Options. Likewise, Output as JSON Schema must be selected to use the JSON Schema Options.

The following options are available:

  • Quote field names selects whether you want to add quotation marks around field names.
    • Only quote field names containing 'dot' means that only field names containing a period are enclosed in quotation marks.
    • Quote all field names means that all field names in the generated JSON are contained in quotation marks.
  • Output as plain JSON means to remove all MongoDB-specific constructs when generating a database for a MongoDB model. This option removes MongoDb constructs such as ObjectId() and instead a generic JSON is generated.
  • Add objects to $def
    • All Nested Objects adds all nested objects under the $def keyword.
    • Only reused Nested Objects adds reused nested objects under the $def keyword. A reused nested object is one that is used in other parent objects.
  • Manage Reusable Definitions
    • Address relative to Root signifies that every object added to the $defs section is referenced by its name relative to the $defs object using $ref. For example, "$ref":"#/$defs/nestedObjectName"
    • Address relative to Base URI signifies that every object added to the $defs section is given an $id comprised of the Relative URI extension plus the object name. This is referenced by parent fields using $ref.
    • Roll up Nested Objects adds every object to the parent field, similar to the roll-up view.

See Also