Class JsonrpcUtils


  • public class JsonrpcUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonrpcUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.gson.JsonObject simplifyJsonrpcMessage​(JsonrpcMessage message)
      Simplifies a JsonrpcMessage by recursively removing unnecessary elements "jsonrpc" and "id".
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonrpcUtils

        public JsonrpcUtils()
    • Method Detail

      • simplifyJsonrpcMessage

        public static com.google.gson.JsonObject simplifyJsonrpcMessage​(JsonrpcMessage message)
        Simplifies a JsonrpcMessage by recursively removing unnecessary elements "jsonrpc" and "id".

        Be aware that this actually changes the JsonObject. It does not work on a copy of the object!

        Parameters:
        message - the JsonrpcMessage
        Returns:
        the simplified JsonObject