Class DocumentsJSONHelper

All Implemented Interfaces:
LogEnabled, Component, Serviceable

Helper to convert documents to JSON
  • Field Details

    • ROLE

      public static final String ROLE
      The Avalon role
  • Constructor Details

  • Method Details

    • commentsToJson

      public <T extends AbstractComment> List<Map<String,Object>> commentsToJson(List<T> comments, String lang, String siteName)
      return a list of comments in JSON format
      Type Parameters:
      T - type of the value to retrieve
      Parameters:
      comments - the comments to translate as JSON
      lang - the current language
      siteName - The current site name
      Returns:
      list of comments