Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-131

Add a Velocity tool to serialize Java objects to JSON format

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-milestone-1
    • Fix Version/s: 4.0-milestone-2
    • Component/s: Velocity
    • Labels:
      None
    • Similar issues:

      Description

      Usage:

      #set($array = [1, 2, 3])
      $jsontool.serialize($array)
      #set($map = {'enabled': true, 'color': 'yellow', 'count': 13})
      $jsontool.serialize($map)
      

      but it should work with almost any Java object.

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              mflorea Marius Dumitru Florea
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: