Class JsonObjectCreator


  • public class JsonObjectCreator
    extends Object
    • Constructor Detail

      • JsonObjectCreator

        public JsonObjectCreator​(org.apache.sling.api.resource.Resource resource,
                                 boolean ecmaSupport)
        Create a new json object creator
        Parameters:
        resource - The source
        ecmaSupport - ECMA date format for Calendar
    • Method Detail

      • create

        public jakarta.json.JsonObjectBuilder create()
        Create the object builder
        Returns:
        The object builder
      • formatEcma

        public static String formatEcma​(Calendar date)
        Helper method to format a calendar
        Parameters:
        date - The calendar
        Returns:
        The formated output