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

大佬,求使用 忽略对象内对象 教程 #51

Open
apgk opened this issue Apr 9, 2021 · 0 comments
Open

大佬,求使用 忽略对象内对象 教程 #51

apgk opened this issue Apr 9, 2021 · 0 comments

Comments

@apgk
Copy link

apgk commented Apr 9, 2021

问个问题 json.net 忽略部分属性 问题 格式如下
假设不设置忽略属性,直接序列化后
{Name:'abc',age:12,student:{name:'abca',age:'sss'}}
但目前需要序列化时忽略部分属性,序列化后如下 student 有可能是数组类型
{Name:'abc',student:{age:'sss'}}
忽略属性是动态的,但父级和子级有可能属性名是一样的,有办法去除么?
忽略属性 可以做到 ["age","student.name"]

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

1 participant