惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

博客园 - 张旋

node-sass 安装卡在 node scripts/install.js 解决办法 如何管理自己? 解决play-1.4.0在linux或mac下提示No such file or directory的问题 写了一个小游戏 Java 动态编译 Play! Framework —— 颠覆“企业级”=“复杂”的观念 JDK 7出人意料将增加“简单”闭包,发布时间推迟至明年底 冷观PDM PDM在中国为什么比ERP更难成功实施? 什么是PDM Hibernate查询快速入门 策略→需求→建模→规划→执行 什么是BNF范式,什么又是EBNF范式? - 张旋 - 博客园 又是好久不写日志 发现自己的blog里有很多好东西 近期杂感 现在的我,有两个状态。我要去找第三个 开发通用类时遇到的几个问题 我是5型
PlayFramework 1.2.x 在Controller 中识别JSON提交
张旋 · 2014-02-23 · via 博客园 - 张旋

链接 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) {
    ...
}

张旋(zxsoft)
如对本文有什么疑问,请在下面写下留言,谢谢!

posted @ 2014-02-23 16:39  张旋  阅读(850)  评论(0)    收藏  举报