-
Notifications
You must be signed in to change notification settings - Fork 28
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
NullReferenceException when serializing (using Version 3.0.1) #6
Comments
I get the same error. Using version 2.20.0 works fine. |
I'm getting the same error, no clue about whats is causing it. But I can't use 2.20 since I also need .NET 4.7 |
In our case the problem was due to the fact that we had private getters and setters (probably bad copy-paste from someone :D). This caused such properties to be included in the PropertyCollection:
Then in the part The null pointer exception comes from Removing the private getters and setters solved our problem (but still it would be nice to improve the code of SharpSerializer). |
Actually, the exception might be caused by a bug that seems to be in SharpSerializer since a long time. It will fail if you try to serialize an array of simple types. For instance, try to serialize this one and you will get the bug:
|
I get the following NullReferenceException when trying to serialize to binary (Burst mode):
The text was updated successfully, but these errors were encountered: