Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-3529

Restapi-call-node: Support for empty tags in json

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Medium Medium
    • New Delhi Release
    • None
    • sli/plugins
    • None

      Currently, when expanding variables in the template, any empty values are removed along with the whole tag.

      Apparently, there is a need to actually send empty values in some cases.

      With this change, prepending the variable name with ~ will cause the empty value to be kept and appear in the resulting JSON.

      Example:

      Template:

      {
          "name1": ${empty_value},
          "name2": ${~empty_value}
      }

      Where empty_value = "", will result in the following JSON:

      {
          "name2": ""
      }
      

       

            stanbonev stanbonev
            stanbonev stanbonev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: