-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Can't JSON Deserialize BacnetAddress #54
Comments
@drosenba sure, this class could have all constructor arguments with default values which would solve your issue. Which branch are you using? |
Nuget package BACnet.Core (1.0.30) |
@drosenba that package comes from a fork of this repository, becuase the original nuget from here still doesn't have .net core version up on nuget. I will try to publish it but since it was added in version 2 which has some breaking changes, it might be a beta at first. |
I'd like to use Newtonsoft.Json to serialize and then deserialize a List
I can serialize it, but I can't deserialize it. Why doesn't BacnetAddress have a default constructor? Can it? :)
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type System.IO.BACnet.BacnetAddress. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path '[0].Address.net', line 1, position 19.
The text was updated successfully, but these errors were encountered: