Is there an easy way to convert properties with dot notation to json
I.E
server.host=foo.bar
server.port=1234
TO
{
Try reading this http://www.oracle.com/technetwork/articles/java/json-1973242.html, you will find several class to work with json.
I guess that retrieving the json from a local file, inner resource in the jar, or in another location specificable by an URL and the just read it with a JsonReader get the job dones.
This is a snipped from the reference site posted before.
URL url = new URL("https://graph.facebook.com/search?q=java&type=post");
try (InputStream is = url.openStream();
JsonReader rdr = Json.createReader(is)) {
JsonObject obj = rdr.readObject();
// from this line forward you got what you want :D
}
}
Hope it helps!