We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
FASTJSON 2缺省使用java.beans.Introspector#decapitalize一致的规则处理getter和setter,这个会导致和fastjson 1.x不兼容。需要修改为在兼容API中使用和fastjson 1.x一致的命名规则。
如下:
public class NamingTest { @Test public void test() { Bean bean = new Bean(); bean.oAuth = "abc"; assertEquals( "{\"oAuth\":\"abc\"}", com.alibaba.fastjson.JSON.toJSONString(bean) ); assertEquals( "{\"OAuth\":\"abc\"}", com.alibaba.fastjson2.JSON.toJSONString(bean) ); } public static class Bean { private String oAuth; public String getOAuth() { return oAuth; } public void setOAuth(String oAuth) { this.oAuth = oAuth; } } }
The text was updated successfully, but these errors were encountered:
fastjson 1.x PropertyNamingStrategy compatible, for issue #1022
69a6ca0
No branches or pull requests
FASTJSON 2缺省使用java.beans.Introspector#decapitalize一致的规则处理getter和setter,这个会导致和fastjson 1.x不兼容。需要修改为在兼容API中使用和fastjson 1.x一致的命名规则。
如下:
The text was updated successfully, but these errors were encountered: