Closed yang-xiaodong closed 5 years ago
Hello,
I really appreciate these changes, can you please update the powershell script (https://github.com/exceptionless/Exceptionless.Net/blob/master/src/Exceptionless/update-json.ps1) to internalize it and rename this attribute. Without doing so makes it very very hard for us to upgrade son.net going forward.
This is a breaking change for anyone that makes use of those attributes. There is another Json attribute that lets you rename a member.
Why would we change the name of JsonIgnoreAttribute to DataMemberIgnore? DataMemberIgnore is a built in framework attribute name that we would be conflicting with. It seems like we could just rely on the fact that JsonNet honors the built in framework DataMember* attributes and just keep everything internal. People would need to use those attributes to control serialization. Only problem with that is that they may want to ignore something they are sending to exceptionless but not ignore it within their app.
@niemyjski I am manually updating these files, I am a PowerShell noob, it is difficult for me to change the script.
@ejsmith
Sorry, I saw the suggestion of DataMemberIgnore in this issue comment. English is not my first language may be an understanding error. Do I need to change it back to JsonIgnoreAttribute
and set it to public
?
Hello, yes that would be preferred just to make that public, also can we update the powershell script to make these changes so we can upgrade easily to newer versions of json.net .
I was thinking that we should rename them to ExceptionlessIgnoreAttribute. So you know that you are ignoring just for Exceptionless.
@niemyjski Can I use Python script to replace PowerShell script?
We'd prefer to keep it powershell due to it runs cross plat also it already exists, we'd just need to update/add 2-3 replacement statements.
@niemyjski I have updated the PowerShell script, and test passed on macOS.
Thanks for the updated powershell script! I agree with Eric on renaming the ignore attribute to ExceptionlessIgnoreAttribute
Then you know you are specifically ignoring it only in exceptionless.
I updated , please check.
By the way , the code in 9.0.1.zip is inconsistent with our current source code (Newtonsoft.Json), I have not replaced it.
@ejsmith @niemyjski
Looks good thanks for the pr! I'm going to try updating us to the latest json.net and push a release soon. It would be nice to get some more changes in the next release.
Hello @ejsmith @niemyjski ,
I think we have all realized the problems(#165) about that the Json.NET is
public
. I also encountered these problems in my project. This PR is used to fix this problem.This PR contains the following modifications:
JsonIgnoreAttribute
toDataMemberIgnoreAttribute
DataMemberIgnoreAttribute
access level topublic
Related issues : #165