Class JsonString


  • public class JsonString
    extends java.lang.Object
    Class representing a string containing JSON. This class can be used as parameter or return value in services to circumvent the conversion stage and directly accept or return raw JSON.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String json
      The concrete JSON string.
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonString()
      Create a new JsonString object.
      JsonString​(java.lang.String json)
      Creates the JsonString object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Matches based on the internal JSON string.
      int hashCode()
      Hash code based on the JSON.
      java.lang.String toString()
      Returns the actual JSON string.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • json

        protected java.lang.String json
        The concrete JSON string.
    • Constructor Detail

      • JsonString

        public JsonString()
        Create a new JsonString object.
      • JsonString

        public JsonString​(java.lang.String json)
        Creates the JsonString object.
        Parameters:
        json - The JSON.
    • Method Detail

      • hashCode

        public int hashCode()
        Hash code based on the JSON.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Matches based on the internal JSON string.
        Overrides:
        equals in class java.lang.Object
      • toString

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