feat:初步实现购买游戏接口(待完整联调)
feat:完善游戏房UI feat:初步实现游戏引擎功能
This commit is contained in:
@@ -7,11 +7,16 @@ import com.google.gson.Gson;
|
||||
*/
|
||||
public class JsonUtils {
|
||||
|
||||
public static Gson gson;
|
||||
|
||||
public static String toJson(Object object) {
|
||||
if (gson == null) {
|
||||
gson = new Gson();
|
||||
}
|
||||
String result = null;
|
||||
try {
|
||||
if (object != null) {
|
||||
result = new Gson().toJson(object);
|
||||
result = gson.toJson(object);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
|
Reference in New Issue
Block a user