Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article helps in getting the data from the JSON files for the column header fields which have white spaces included in them.

Instructions

  1. Log in to Confluence.
  2. Insert
    1. Go to an existing page and edit the macro. Go to step # 3.
    2. If new page, then insert the JSON Table macro in
    a
    1. the Confluence page
    .Input the JSON data through the Method of locating script or follow the instructions mentioned in the Build an Advanced Table from Rest API Data 8
    1. .
    x article and save the macro settings.
  3. The article in Step 4 works fine if the field names don't have any white spaces included in them.
  4. If there are any white spaces included

    in the field names,

    (for example

    from

    , as shown in the JSON data

    shown

    below, the fields

    named

    App Name and Product Category) and if one try to pass the field names as is, then

    the result will be:

    you will get an error: Error rendering macro json-table: Space not allowed in path. 

    Code Block
    [{"Tools":["Both"],"Role":["Support Engineer"],"Name":["K S"],"User":["test.user"],"App Name":["Bobswift"],"Product Category":["BI reporting"]}]
    Image Removed


    Here is the below screenshot with the error message as stated above. 
    Image Added


  5. To avoid this error and to render the data by escaping the white spaces, the field names should be given as ['App Name'],['Product Category'], then the results are will be similar to the one as shown below:


    Save
  6. You can save the settings and Publish the page.

    Info