0

I want to have an array with the value of json:

arr[ ] array = {"http://www.ip-api.com/json"};

when I print this array, how can I have json but not "http://www.ip-api.com/json" as a string?

1
  • 1
    You have to call the url Commented Oct 22, 2015 at 11:23

1 Answer 1

1

Use a JSON generating library such as Jackson and have it serialize the data structure.

https://github.com/FasterXML/jackson

If you want to actually mean that you want to call the service at that URL then you need to use a suitable library for that...

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.