Skip to content
New issue

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

[FEATURE] SupportSmartMatch增强识别Boolean类型的别名 #976

Closed
wenshao opened this issue Nov 28, 2022 · 1 comment
Closed

[FEATURE] SupportSmartMatch增强识别Boolean类型的别名 #976

wenshao opened this issue Nov 28, 2022 · 1 comment
Labels
enhancement New feature or request fixed
Milestone

Comments

@wenshao
Copy link
Member

wenshao commented Nov 28, 2022

  @Test
    public void test2() {
        String string = "{\"isSuccess\":true}";
        Bean1 bean1 = JSON.parseObject(string, Bean1.class, JSONReader.Feature.SupportSmartMatch);
        assertEquals(Boolean.TRUE, bean1.isSuccess);
    }

    public static class Bean1 {
        private Boolean isSuccess;

        public Boolean isSuccess() {
            return isSuccess;
        }

        public void setSuccess(Boolean success) {
            isSuccess = success;
        }
    }
@wenshao wenshao added the enhancement New feature or request label Nov 28, 2022
@wenshao wenshao added the fixed label Nov 30, 2022
@wenshao wenshao added this to the 2.0.21 milestone Nov 30, 2022
@wenshao
Copy link
Member Author

wenshao commented Dec 10, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.21
问题已修复,请用新版本

@wenshao wenshao closed this as completed Dec 10, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request fixed
Projects
None yet
Development

No branches or pull requests

1 participant