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

Add a Velocity tool to serialize Java objects to JSON format

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 4.0-milestone-2
    • 4.0-milestone-1
    • Velocity
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: