Class JsonObjectCreator

java.lang.Object
org.apache.sling.servlets.get.impl.util.JsonObjectCreator

public class JsonObjectCreator extends Object
  • Constructor Details

    • JsonObjectCreator

      public JsonObjectCreator(Resource resource, boolean ecmaSupport)
      Create a new json object creator
      Parameters:
      resource - The source
      ecmaSupport - ECMA date format for Calendar
  • Method Details

    • 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