Move routing-in-play -> play-framework

This commit is contained in:
Grzegorz Piwowarek
2016-10-24 09:44:21 +02:00
parent bc290f1166
commit 75d86610ff
57 changed files with 0 additions and 0 deletions
@@ -0,0 +1,17 @@
package util;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import play.libs.Json;
public class Util {
public static ObjectNode createResponse(Object response, boolean ok) {
ObjectNode result = Json.newObject();
result.put("isSuccessfull", ok);
if (response instanceof String)
result.put("body", (String) response);
else result.put("body", (JsonNode) response);
return result;
}
}