Interface JsonSerializer

All Known Implementing Classes:
DefaultJsonSerializer, ImplicitJsonConverter, StringJsonSerializer, VFileJsonConverter

public interface JsonSerializer
Converter result object into json.
Author:
npiedeloup
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(Class<?> paramClass)
     
    toJson(Object result, jakarta.servlet.http.HttpServletResponse response, WebServiceDefinition webServiceDefinition)
    Convert result to json.
  • Method Details

    • canHandle

      boolean canHandle(Class<?> paramClass)
      Parameters:
      paramClass - Class to test
      Returns:
      If this converter can output this type of data.
    • toJson

      String toJson(Object result, jakarta.servlet.http.HttpServletResponse response, WebServiceDefinition webServiceDefinition)
      Convert result to json.
      Parameters:
      result - Result
      response - Response
      webServiceDefinition - WebService definition
      Returns:
      Json (or empty string)