JSON to UML

The UML reverse engineering tool allows you to transform JSON to a UML diagram. You can get UML from JSON very easily on just a few clicks.

What is JSON?

JSON is an acronym from JavaScript Object Notation. It is a light-weight human-readable format for data interchange. It has a very simple structure that allows effective multi-platform communication. Although it has JavaScript in the name, it is completely language and platform-independent.

The JSON format is based on 2 basic building blocks:

  • a list of key-value pairs
  • an ordered array of values

These building blocks can be combined in complex hierarchies that define a serialized object.

JSON is very popular in REST services.

Create UML Diagrams from JSON

Software Ideas Modeler allows you to generate UML diagrams from JSON data.

The feature is available from the ribbon tab Process. Click on the JSON button in the Reverse Engineering group (Process tab) to open the JSON Import dialog. The importer tool processes the JSON files and creates UML class and object diagrams accordingly.

JSON to diagram (in the ribbon)
JSON to diagram (in the ribbon)

Import JSON

JSON Import dialog offers two tabs - General and Settings. The General tab allows you to add JSON files that you want to process into UML diagrams. There are buttons for adding files:

  • Add Files - add a file or multiple JSON files to the list.
  • Add Directory - adds all JSON files from a chosen folder to the list.

After adding the files to the list, you can choose which file will be imported. The selection buttons help you to adjust the final list of JSON files that will be turned to diagrams:

  • Select All - selects all files in the list
  • None - deselects all files
  • Invert - invert the selection of files
JSON Import dialog
JSON Import dialog

JSON Import Settings

Content group

  • Include values as default values - classes in the created class diagrams will use values from the JSON file as default values for their attributes.
  • Object diagrams - if checked, UML object diagrams will be generated by the JSON files.

Diagramming group

  • Add new elements to diagram - if checked, diagrams will be created, otherwise, only model elements will be imported into the project
  • Target folder - specifies the folder where the created diagrams will be placed

Model group

  • Repository for model elements - specifies the folder where the imported model element will be created. It may be:
    • Default repository
    • Custom repository - any selected repository in the project
JSON Import dialog - Settings
JSON Import dialog - Settings

New Comment

Comment