Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11538

Add display context for JSON string

    XMLWordPrintableJSON

Details

    Description

      It would be useful to add an output context to HTL to be used inside JSON. As JSON is very complex, the most essential one which currently cannot be achieved with any other existing contexts is escaping for a JSON String value (compare with https://github.com/adobe/htl-spec/issues/5).
      I propose to introduce a new context jsonString next to scriptString in https://github.com/apache/sling-org-apache-sling-scripting-sightly/blob/192d953514e6e579428cda157a7e83fc2a05cc01/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/XSSRuntimeExtension.java#L93.

      As it is not part of the official HTL spec at https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#121-display-context it needs to be listed as Sling-specific addition in https://sling.apache.org/documentation/bundles/scripting/scripting-htl.html#extensions-of-the-htl-specification.

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m