XWiki Commons
  1. XWiki Commons
  2. XCOMMONS-131

Add a Velocity tool to serialize Java objects to JSON format

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major 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.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: