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

java 转json 需要支持可以设置过滤某些有业务逻辑的属性 #299

Closed
venusdrogon opened this issue Sep 15, 2020 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request feilong-json feilong-json
Milestone

Comments

@venusdrogon
Copy link
Collaborator

venusdrogon commented Sep 15, 2020

java 转json 需要支持可以设置过滤某些有业务逻辑的属性 , 比如

03:52 DEBUG (Test1.java:29) [testNew1()]     {
        "orderInfoList":         [
                        {
                "chargeDetials": "24121",
                "discountDetials": {"discountInfo":                 {
                    "discountAmt": "0",
                    "discountCode": "COD"
                }}
            },
                        {
                "chargeDetials": "6666",
                "discountDetials": {"discountInfo":                 {
                    "discountAmt": "8888",
                    "discountCode": "alipay"
                }}
            }
        ],
        "ssd": null
    }

如果 discountDetials 里面的discountInfo 对象 discountAmt 属性是 "0" , 那么整个discountDetials 不输出

期望结果:

03:52 DEBUG (Test1.java:29) [testNew1()]     {
        "orderInfoList":         [
                        {
                "chargeDetials": "24121"
            },
                        {
                "chargeDetials": "6666",
                "discountDetials": {"discountInfo":                 {
                    "discountAmt": "8888",
                    "discountCode": "alipay"
                }}
            }
        ],
        "ssd": null
    }
@venusdrogon venusdrogon self-assigned this Sep 15, 2020
@venusdrogon venusdrogon added the enhancement New feature or request label Sep 15, 2020
@venusdrogon venusdrogon added this to the 3.0.10 milestone Sep 15, 2020
@venusdrogon venusdrogon added the feilong-json feilong-json label Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feilong-json feilong-json
Projects
None yet
Development

No branches or pull requests

1 participant