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

[FEATURE] 能不能加个接口:JSON.toJSONString(obj, objectWriterProvider, features)? #719

Closed
noear opened this issue Aug 31, 2022 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@noear
Copy link
Contributor

noear commented Aug 31, 2022

没有它的话,定制的 ObjectWriterProvider 实例不能快捷的使用

@noear noear added the enhancement New feature or request label Aug 31, 2022
@wenshao
Copy link
Member

wenshao commented Aug 31, 2022

parseObject有类似的方法,比如:

interface JSON {
static <T> T parseObject(String text, Class<T> clazz, JSONReader.Context context);
}

使用是这样用:

ObjectReaderProvider provider = ...;
JSON.parseObject(str, JSONObject.class, JSONFactory.createReadContext(provider));

你可以参考这个提交一个PR么?

@wenshao wenshao added this to the 2.0.13 milestone Aug 31, 2022
@noear
Copy link
Contributor Author

noear commented Aug 31, 2022

可以:)

@noear
Copy link
Contributor Author

noear commented Aug 31, 2022

pr#724 已提

@wenshao
Copy link
Member

wenshao commented Sep 5, 2022

PR怎么关了?重新提一个吧?

@noear
Copy link
Contributor Author

noear commented Sep 6, 2022

PR怎么关了?重新提一个吧?

之前的经验是,提交新pr前,旧pr 得关掉。。。写单测,我得把项目编译通,要花时间:)

@wenshao
Copy link
Member

wenshao commented Sep 10, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.13
2.0.13版本已经发布,请用帮忙用新版本验证

@wenshao wenshao closed this as completed Sep 10, 2022
@noear
Copy link
Contributor Author

noear commented Sep 11, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.13 2.0.13版本已经发布,请用帮忙用新版本验证

试了,OK

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

No branches or pull requests

2 participants