Architect custom JSON editor

Rule-based decisions: Feature coming soon

The custom JSON editor allows you to quickly build complex JSON data structures using typeahead suggestions and real-time validation tools. The editor makes it easy for you to work with hierarchical and nested data structures. The inbuilt validation tool adapts to the JSON schema in effect and makes it seamless to work with JSON properties and values. It also offers quick fix solutions for commonly occurring syntax errors such as data type mismatches or missing tokens.

Build your custom JSON objects

To define your custom JSON values, follow these steps:

  1. For a custom JSON type variable, for example, in a Call Decision Table action and after you select the JSON editing mode, click Click to add JSON literal value. The JSON Editor pane opens. 
  2. To start building your JSON data, press the assigned shortcut key for typeahead or enter your data manually.
  3. To select a property from the predefined input schema, type the property name or select it from the typehead suggestions.
  4. To supply a value to the selected property, enter a literal value or dynamic expression. If the data type allows, you can select one of the available values in literal mode.
  5. Click Save to save the changes or Cancel to close the editor.
  6. (Optional) Switch the input editing mode to Standard to confirm the values or to update them.

Use Architect specific delimiters

In addition to standard JSON delimiters, the custom JSON editor allows the following delimiters:

  • Double square brackets( ‘[[‘ and ‘]]’ ): Use to select any available queue. For example, "myflowqueue": [[Existing Queue]].
  • Double curly brackets( ‘{{‘ and ‘}}’ ): Use to supply an expression as the value of a JSON property. For example, "numberproperty": {{ Round(20.25) }}.

Use typeahead suggestions

Typeahead helps you add:

  • One or more available properties as defined in the schema. You can view the following details in the typeahead suggestions:
    • Property name from the schema
    • Property description from the schema
    • Data type of the property
    • Predefined values for data types such as Booleans and Enums.
  • Existing Architect functions for expressions
  • Empty JSON objects

    Supply values as dynamic expressions

    You can also supply dynamic expressions as values within your JSON. Architect evaluates these expressions at runtime.

    Real-time validation and suggestions

    The inbuilt validation tool helps you identify errors before execution, quickly fix issues using real-time suggestions, and ensure that your JSON structure and values conform to the predefined input schema.

    The tool continuously checks syntax validity as you type and visually marks syntax errors with indicators such as:

    • Inline squiggles: Hover over the syntax that has red squiggles to view and troubleshoot the error. 
    • Line highlights: Click the highlighted line to locate the syntax in error. 
    • Validation status and suggestions panel toggle: Shows Validated when the syntax has no errors. Click it to open or close the suggestions panel. 
    • Suggestions panel: Displays errors such as missing tokens, invalid syntax, and so on. Suggests instant solutions to commonly occurring syntax errors. Review the suggestion, accept, or ignore it.. 
      Note: The editor also notifies you if a value that you provide for a property does not match the data type or meet other restrictions such as minimum and maximum limits defined in the schema. If it can transform the mismatching value, it gives you an option to convert the value to the matching data type or to meet the set criteria.

    Use the find and replace feature

    To open the Find and Replace panel, press the assigned keyboard shortcut.

    To search for a term, enter the term in the Find field and click Next Match or Previous Match to navigate to the terms. If you must replace the terms, provide a replacing term and click Replace or Replace all

    Find and replace in custom JSON editor in Architect

    Customize your keyboard shortcuts

    To view and change the keyboard shortcuts for the editor, follow these steps:

    1. Hacer clic Preferencias.Aparece el cuadro de diálogo Preferencias.
    2. Under Keyboard Shortcuts, click and expand Code Editor.
    3. Under Code Editor, define your keyboard shortcuts for the editor.
    4. Para restablecer los métodos abreviados de teclado predeterminados, haga clic en Restablecer valores predeterminados.
    5. (Opcional) Puede definir pulsaciones de teclas primarias y secundarias para cualquier acceso directo.
    6. Click Save to save your changes or click Cancel to discard them.

    The following keyboard shortcuts are available:

    Acción Descripción Default shortcut
    Show typeahead Opens the typeahead dialog box. Ctrl + Space
    Encontrar Finds the matching keywords.

    Windows: Win + F

    Mac: Command + F

    Next match Goes to the next matching keyword.

    Windows: Win + G

    Mac: Command + G

    Previous match Goes to the previous matching keyword.

    Windows: Win + Shift + G

    Mac: Command + Shift + G