Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objs对象转换bug #184

Closed
juqkai opened this issue Mar 26, 2012 · 5 comments
Closed

Objs对象转换bug #184

juqkai opened this issue Mar 26, 2012 · 5 comments
Assignees
Labels
Milestone

Comments

@juqkai
Copy link
Member

juqkai commented Mar 26, 2012

当使用Map/List中间对象转换成Object对象时, 如果Object中没有申明属性, 而需要setABC来注入值时, 不会调用setABC因为没实现...

影响: MVC对象参数, JSON

@wendal
Copy link
Member

wendal commented Mar 26, 2012

额... 没看懂

@juqkai
Copy link
Member Author

juqkai commented Mar 26, 2012

class a{
int id;
public void setId(int id){this.id = id}
public void setName(String name){System.out.println(name);}
}

String json = "{
id: 1,
name: "juqkai"
}"

Json.fromJson(a.class, json);

上面代码将不会调用 setName() 方法进行注入

@wendal
Copy link
Member

wendal commented Mar 26, 2012

恩,改改咯

@juqkai
Copy link
Member Author

juqkai commented Mar 26, 2012

恩,正在改

juqkai added a commit that referenced this issue Mar 26, 2012
juqkai added a commit that referenced this issue Mar 26, 2012
@juqkai
Copy link
Member Author

juqkai commented Mar 26, 2012

完成

@juqkai juqkai closed this as completed Mar 26, 2012
@ghost ghost assigned juqkai Mar 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants