Package com.oss.asn1

Interface JSONCoderInterface

public interface JSONCoderInterface
This interface allows you to override the standard method that are used to JSON encode ASN.1 types. Whenever the subclass of AbstractData implements the JSONCoderInterface interface, its encode(JSONWriter) method is called to generate JSON encoding of that type.
ASN.1/Java 8.0
  • Method Summary

    Modifier and Type
    Encodes this data value.
  • Method Details

    • encode

      void encode(JSONWriter writer) throws EncodeFailedException, IOException
      Encodes this data value. This method is invoked when AbstractData value containing this data value is encoded. The character JSON content is emitted using write() methods of the writer object. The data written is not analyzed in any way. It is user's responsibility to provide data compatible with JSON specification.
      writer - JSONWriter to write encoded value to.
      EncodeFailedException - thrown if the customized method fails.
      IOException - thrown if error occurs while writing to a target stream.