Deserealization without root

22 views
Skip to first unread message

Rodrigo Catalan

unread,
Aug 1, 2011, 11:55:01 AM8/1/11
to restfulie-java
Hi guys.

Am I using restfulie-java client, but I found no way to deserialize
json's without root.

Example:

JSON:

{
"um": "um",
"dois": "dois"
}

Type:

public class MyType {

private String um;
private String dois;

public String getUm() {
return um;
}
public void setUm(String um) {
this.um = um;
}
public String getDois() {
return dois;
}
public void setDois(String dois) {
this.dois = dois;
}
}

Method:

MyType myType = Restfulie.resource(URI).get();

So, how can I do it?

Guilherme Silveira

unread,
Aug 1, 2011, 12:37:17 PM8/1/11
to restful...@googlegroups.com

Hi there

You are right. It should return a Map. Can you try with the patch provided at our pull request?

Regards

Guilherme Silveira

Reply all
Reply to author
Forward
0 new messages