0

I'm writing an application using the public Tumblr API, just for fun. I have set up my oauth keys, and I have the URL for accessing my blog's info. I was wondering how I could take the JSON-encoded data from that page and turn it into Strings for working with.

To be clear, if I wanted a blog's title, I could send a request to this URL and select the data for the title.

Thanks!

1 Answer 1

2

I've used Restlet for retrieving JSON data from a rest service. Below is the sample

Representation entity = new ClientResource("your url").get();
JsonRepresentation jsonRepresentation = new JsonRepresentation(entity.getText());
JSONObject jsonObject = jsonRepresentation.getJsonObject();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.