Class JSONEncoder

java.lang.Object
org.webpki.json.JSONEncoder
Direct Known Subclasses:
AuthenticationRequestEncoder, AuthenticationResponseEncoder, CredentialDiscoveryRequestEncoder, CredentialDiscoveryResponseEncoder, InvocationRequestEncoder, InvocationResponseEncoder, KeyCreationRequestEncoder, KeyCreationResponseEncoder, ProvisioningFinalizationRequestEncoder, ProvisioningFinalizationResponseEncoder, ProvisioningInitializationRequestEncoder, ProvisioningInitializationResponseEncoder

public abstract class JSONEncoder extends Object
Base class for java classes which are used for creating specific JSON object types.
  • Constructor Details

    • JSONEncoder

      protected JSONEncoder()
      INTERNAL USE ONLY.
  • Method Details

    • writeJSONData

      protected abstract void writeJSONData(JSONObjectWriter wr)
      INTERNAL USE ONLY.
      Parameters:
      wr - A JSON writer
    • getContext

      public abstract String getContext()
      Emulation of XML namespace
      Returns:
      The context name
    • getQualifier

      public String getQualifier()
      Optional type indicator for JSON objects belonging to the same @context.
      Returns:
      The qualifier name
    • serializeJSONDocument

      public byte[] serializeJSONDocument(JSONOutputFormats outputFormat)
      Parameters:
      outputFormat - The wanted formatting
      Returns:
      Document in JSON [binary] format