Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;
import com.google.gson.Gson;

public class Main {
    public static Object parse(String msg, Class tClass) {
        try {
            Log.i("Class", msg);
            Gson gson = new Gson();
            Object obj = gson.fromJson(msg, tClass);
            return obj;
        } catch (Exception e) {

        }
        return null;
    }
}