while using cmd prompt its working fine in windows platform
but using rpc it,s getting below errors
{"result":null,"id":null,"error":{"code":-8,"message":"data should be object with single element"}}
{"result":null,"id":null,"error":{"code":-8,"message":"data should be hexadecimal string or recognized object"}}
example code (publish)
String method = "publish";
//creating json object
JSONObject json = new JSONObject();
json.put("userName", "karthik");
List<Object> params = new ArrayList<Object>();
params.add(streamName);
params.add(key);
params.add(json);
JSONObject json1 = new JSONObject();
json1.put("chain_name", "testchain");
json1.put("method", method);
json1.put("params", params);
the above code written by java
that code is running properly while passing the hexadecimal string but passing json object getting above mention errors