链接 http://*.com/questions/6132892/consuming-json-in-play-framework-controller
@Global
public class JsonObjectBinder implements TypeBinder<JsonObject> { @Override
public Object bind(String name, Annotation[] annotations, String value, Class actualClass, Type genericType) throws Exception {
return new JsonParser().parse(value);
} }
然后就可以
public static void handleJsonBody(JsonObject body) {
...
}