Fix json deprecations
This commit is contained in:
@ -73,16 +73,16 @@ public final class NioClient {
|
||||
Reader r = new InputStreamReader(is, "ISO-8859-1");
|
||||
JsonObject map = (JsonObject) Jsoner.deserialize(r);
|
||||
r.close();
|
||||
Collection servers = map.getCollection("servers");
|
||||
Collection servers = map.getCollection(Jsoner.mintJsonKey("servers", null));
|
||||
for (Object server : servers) {
|
||||
JsonObject s = (JsonObject) server;
|
||||
String name = s.getString("name");
|
||||
String skey = s.getString("publicKey");
|
||||
String name = s.getString(Jsoner.mintJsonKey("name", null));
|
||||
String skey = s.getString(Jsoner.mintJsonKey("publicKey", null));
|
||||
byte[] key = Base64.decode(skey, true);
|
||||
Collection addresses = s.getCollection("addresses");
|
||||
Collection addresses = s.getCollection(Jsoner.mintJsonKey("addresses", null));
|
||||
String addr = null;
|
||||
for (Object a : addresses) {
|
||||
addr = ((JsonObject) a).getString("address");
|
||||
addr = ((JsonObject) a).getString(Jsoner.mintJsonKey("address", null));
|
||||
break;
|
||||
}
|
||||
String[] split = DataHelper.split(addr, ":", 2);
|
||||
|
Reference in New Issue
Block a user