I want to read .json file in java and typecast it to JsonObject.Please suggest the code with Json but not JSON.I am using io.vertx.core.json.JsonObject library
.
Object obj = parser.parse(new FileReader()); //this is from library simple.ore.JSON.
JsonObject obj1;
obj1 = (JsonObject)(obj);
I tried to use JSONparser for file reader which gives JSONObject but i need JsonObject.
java.lang.ClassCastException: org.json.simple.JSONObject cannot be cast to io.vertx.core.json.JsonObject.