oh okay 6 Share 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? Link to comment Share on other sites More sharing options...
NovaGTX 106 Share 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. Link to comment Share on other sites More sharing options...
oh okay 6 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.