Class AcmeJson


  • public final class AcmeJson
    extends java.lang.Object
    A model containing a JSON result. The content is immutable.
    Author:
    ACME4J team
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AcmeJson.Array
      Represents a JSON array.
      static class  AcmeJson.Value
      A single JSON value.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.String key)
      Checks if this object contains the given key.
      AcmeJson.Value get​(java.lang.String key)
      Returns the AcmeJson.Value of the given key.
      java.util.Set<java.lang.String> keySet()
      Returns a set of all keys of this object.
      static AcmeJson parse​(byte[] bytes)
      Parses JSON from byte[].
      static AcmeJson parse​(java.lang.String json)
      Parses JSON from a String.
      java.lang.String toString()
      Returns the content as JSON string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • keySet

        public java.util.Set<java.lang.String> keySet()
        Returns a set of all keys of this object.
        Returns:
        Set of keys.
      • contains

        public boolean contains​(java.lang.String key)
        Checks if this object contains the given key.
        Parameters:
        key - Name of the key to check
        Returns:
        true if the key is present
      • toString

        public java.lang.String toString()
        Returns the content as JSON string.
        Overrides:
        toString in class java.lang.Object