Interface JsonSerializer


public interface JsonSerializer
Contract for JSON serializers that convert Java objects into their JSON string representation.

Implementations are responsible for taking any Java object and serializing it into a JSON-formatted String.

  • Method Summary

    Modifier and Type
    Method
    Description
    Serialize the given Java object into a JSON string.
  • Method Details

    • writeToString

      String writeToString(Object object)
      Serialize the given Java object into a JSON string.
      Parameters:
      object - the object to serialize (may be null)
      Returns:
      a JSON-formatted string representing the object