class Bus{ private int id; private Route route; //setters and getters } class Route{ private int id; private List<Bus> listBus; //setters and getters }
Gson gson = new Gson(); Bus bus = getABus();//get the bus String json = gson.toJson(bus);
com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)