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

链式风格API? #551

Closed
40lsgy1 opened this issue Apr 16, 2016 · 4 comments
Closed

链式风格API? #551

40lsgy1 opened this issue Apr 16, 2016 · 4 comments
Milestone

Comments

@40lsgy1
Copy link

40lsgy1 commented Apr 16, 2016

目前的写法是这样的:

JSONObject object = new JSONObject();
object.put("foo", "bar");

可否改为支持链式风格的API?

JSONObject object = new JSONObject().put("foo", "bar");
@wenshao wenshao added this to the 1.2.9 milestone Apr 16, 2016
@wenshao
Copy link
Member

wenshao commented Apr 16, 2016

JSONObject object = new JSONObject().fluentPut("foo", "bar");

已支持,等1.2.9发布吧

@wenshao wenshao closed this as completed Apr 16, 2016
@40lsgy1
Copy link
Author

40lsgy1 commented Apr 16, 2016

额,这么巧,好吧

@pandajava
Copy link

太好了,感谢 官方支持!!!

@crskyp
Copy link

crskyp commented Apr 28, 2019

没有支持吧,JSONObject().put返回的object类型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants