Class JsonResponse<T>

java.lang.Object
com.morpheusdata.views.JsonResponse<T>
Type Parameters:
T - Type of the data object, can be Map

public class JsonResponse<T> extends Object
A response object that is passed back to morpheus-ui to render json and response. Optionally strongly typed.
  • Field Details

    • data

      public T data
    • status

      public Integer status
  • Constructor Details

    • JsonResponse

      public JsonResponse()
  • Method Details

    • of

      public static JsonResponse<?> of(Object data)
      Helper method to create a successful JsonResponse of an object
      Parameters:
      data - The object to base the model off of
      Returns:
      a ViewModel