PlayFramework 1.2.x 在Controller 中识别JSON提交

链接 http://stackoverflow.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) {
    ...
}
原文地址:https://www.cnblogs.com/zxsoft/p/3562091.html