Class DatasetJson

java.lang.Object
com.axelor.meta.query.dataset.DatasetJson

public final class DatasetJson extends Object
The JSON spelling of dataset enums, for code that writes or reads them by hand.
  • Method Details

    • jsonName

      public static String jsonName(Enum<?> value)
      The JSON spelling of an enum constant.

      Taken from the mapper rather than derived from the constant's name, so a value written into a hand-built response cannot drift from the one serialization produces.

    • fromJsonName

      public static <T extends Enum<T>> T fromJsonName(String name, Class<T> type)
      The constant a JSON spelling names, or null when it names none.