Open OlivierVerhaegen opened 1 month ago
If the JsonEncodingIds are not defined in the NodeSet then it can't be implemented. The JsonEncodingIds are optional in 1.05.03 and removed from 1.05.4. The DataTypeId is used instead.
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? How should I implement this, just by updating to 1.05.4?
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.
This seems that the exception is categorized as "User-Unhandled". When I disable the breakpoint optionf for these kind of exceptions the code runs but weirdly I don't get the error logs defined in the code you mentioned above. I only get these logs:
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).
I'm using the following nuget package: <PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="1.5.374.78" />
.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 runningServer.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.