oh okay 6 Posted July 13, 2019 Im trying to get an connection to a public updating price api but it seems like the connection doesn't go through and I don't see any errors in debugger? does anyone have an answer as to why?
NovaGTX 106 Posted July 14, 2019 Not sure about your JSON library you're using, but this works for getting the data. URL url = new URL("https://storage.googleapis.com/osbuddy-exchange/summary.json"); InputStream is = url.openConnection().getInputStream(); BufferedReader BR = new BufferedReader(new InputStreamReader(is)); String all = BR.lines().collect(Collectors.joining()); Something tells me you have an issue with how you're parsing the JSON data.
oh okay 6 Author Posted July 14, 2019 51 minutes ago, NovaGTX said: Not sure about your JSON library you're using, but this works for getting the data. URL url = new URL("https://storage.googleapis.com/osbuddy-exchange/summary.json"); InputStream is = url.openConnection().getInputStream(); BufferedReader BR = new BufferedReader(new InputStreamReader(is)); String all = BR.lines().collect(Collectors.joining()); Something tells me you have an issue with how you're parsing the JSON data. Yeah I figured thats it, how do you go about parsing json yourself? I would love a snippet bro
Recommended Posts
Archived
This topic is now archived and is closed to further replies.