-
Notifications
You must be signed in to change notification settings - Fork 96
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
Custom struct throwing NotSupportedException on getting JsonEncodingId #185
Comments
If the JsonEncodingIds are not defined in the NodeSet then it can't be implemented. |
Hi thank you for the quick response! I'm currently using Model version 1.4.10 so that would explain why no JsonEncodingIds are available? |
You not get an exception in AddEncodeableTypes since there is a try catch block to suppress this error. Can you explain exactly where the exception is coming from? |
I cannot see the insides of AddEncodeableTypes but I only get the exception when running in debug mode. |
Code is here: https://github.com/OPCFoundation/UA-.NETStandard/blob/master/Stack/Opc.Ua.Core/Types/Encoders/EncodeableFactory.cs Do you have some setting enabled to stop on exception? This can cause the debugger to halt even if an exception is handled. |
opcua.dll means you are using someone else's code base. where did you get the dll from? |
I'm just compiling my own project using .NET core on Linux and removed a part of the project name, hence why you only see opcua.dll in the name |
You should not get an error. AddEncodeableTypes suppresses the NotImplementedException and continues. |
Yeah I know I've read the code (not only master but also specific to the version I'm using). .Net Core version 8.0.303 on Ubuntu 20.04.3 LTS |
Hi All,
I noticed that the
JsonEncodingId
currently throws anNotSupportedException
although the class implementsIJsonEncodeable
. The class was generated from a custom struct in the NodeSet2.xml model.This happens when running
Server.Factory.AddEncodeableTypes(...)
.Can someone explain why this is implemented this way and why custom structs are not supported for JSON encoding?
Thanks already for the information.
The text was updated successfully, but these errors were encountered: