Class JsonrpcUtils

java.lang.Object
io.openems.common.utils.JsonrpcUtils

public class JsonrpcUtils extends Object
  • Constructor Details

    • JsonrpcUtils

      public JsonrpcUtils()
  • Method Details

    • 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