Adding Business Objects from JSON Schema

It is possible in AwareIM to create definitions of business objects from a file in JSON format. This can be useful if these objects are involved when consuming REST services that require JSON input or generate a JSON reply. For example, if a service returns a JSON reply you can specify that it should map to a particular business object that has the same structure as JSON returned by the service provider. Before you specify this, you actually need to define such an object. The name of every attribute in such an object has to match the name of the attribute in the JSON returned by the service provider and if there are embedded objects you need to create the definition of the embedded object and define a reference attribute to the embedded object. This can be time consuming and tedious. However, if you have a sample of the JSON file returned by the service provider, you could use this file to create all the required objects and attributes automatically.

To use this feature you should select the “Business Objects” node in the Elements Tree, right click to bring up the Context menu and select the “Add from JSON Schema” from the context menu. You will then need to specify the file in the JSON format that you want to import. AwareIM will scan the file and display its structure as a relationship diagram where it will show all business objects and relationships created from the JSON file. It will also show a textual representation of the diagram as a tree of objects and attributes underneath the diagram.

If you do not need all objects you can delete the objects you don't need either by clicking on them in the diagram or clicking on them in the textual tree. Then you can press the Delete key on the keyboard. It is possible that adding objects from the JSON file will introduce some conflicts. For example, the JSON may use attribute names that are not allowed in AwareIM, like ID. Or business objects with the same names may already exist. If a conflict occurs AwareIM will display the problematic attribute or object in red and will not allow to move any further. It will also show all conflicts if you click on the “Invalid Names” link. You need to resolve the conflicts by changing the names of the offending objects or attributes. To do this you should click on the “Change Name” link and provide an alternative name.

When all conflicts have been resolved you can press OK and the new objects will be added to the business space version.

  • Last modified: 2025/06/12 04:00