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. oh okay 1 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now