I need to write a function that gets a Json via Spring and deliver a Data. The case is that a customer is sending me a Filename and im looking in a database where the file is and send him the data. I only need a little kickstart and someone who can answer me to my Questions:
You can use Response like this :
String yourData;
JsonWriter writer = new JsonWriter(response.getWriter());
writer.beginObject();
writer.name("data").value(yourData);
writer.endObject();
writer.close();