public class JsonParser {
public static String getJson(Context context,String path) {
String params = "";
AssetManager assetManager = context.getResources().getAssets();
try {
InputStream ins = assetManager.open(path);
byte[] buffer = new byte[ins.available()];
ins.read(buffer);
ins.close();
params = new String(buffer);
JSONObject object = new JSONObject(params);
params = object.toString();
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
return params;
}
}