Interface ToJsonRepresentation<T,JSON extends JsonRepresentation<T>>

Type Parameters:
T - the type of the value
JSON - the type of the JSON representation ofthe value

public interface ToJsonRepresentation<T,JSON extends JsonRepresentation<T>>
A function that transforms a value into its JSON representation.
  • Method Summary

    Modifier and Type
    Method
    Description
    map(T value)
    Maps a value into its JSON representation.
  • Method Details

    • map

      JSON map(T value) throws Exception
      Maps a value into its JSON representation.
      Parameters:
      value - the value
      Returns:
      its JSON representation
      Throws:
      Exception - if the conversion failed