1
I would like to know how to select data using gson library.
BufferedReader reader = null;
URL endereco = new URL("https://prod.api.pvp.net/api/lol/"+Server+"/v1.4/summoner/by-name/"+Jogador+"?api_key="+API_KEY);
try {
BufferedReader br = new BufferedReader(new InputStreamReader(endereco.openStream()));
Gson obj = new Gson();
System.out.println(br.readLine());
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException ignore) {}
}
}
I had as a result:
{ "exemplo" : {
"id" : 1473077,
"name" : "Exemplo",
"profileIconId" : 25,
"revisionDate" : 1355854041000,
"summonerLevel" : 13
}
}
What did Oce want as a result? Explain more about your problem.
– Mansueli
I’d like to take the data and manipulate it, with this get I get the whole result, I’d like to separate. Select id and store, select name and etc.
– Luan R