import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
InputStream stream=getResources().openRawResource(R.raw.weather2);
BufferedReader reader=new BufferedReader(new InputStreamReader(stream));
String jsonStr="",line="";
try {
while ((line=reader.readLine())!=null){
jsonStr+=line;
} catch (IOException e) {
e.printStackTrace();
Log.d("MainActivity", jsonStr);