Professional OPC
Development Tools

logos

Serialize UAGenericObject as JSON

More
11 Nov 2019 13:39 #7954 by jlorek
Thanks for the info.

Please Log in or Create an account to join the conversation.

More
05 Nov 2019 06:28 #7912 by support
Unfortunately we do not currently have JSON serialization for UAGenericObject (or any our objects, in fact). I suggest that you design something of your own.

I would also slightly recommend against using the XML format for any long-term storage, because there was a consideration to change it in some future version (although no plans have been made yet). While we will probably provide some means for conversions, there will be an extra effort at that point.

Best regards
The following user(s) said Thank You: jlorek

Please Log in or Create an account to join the conversation.

More
04 Nov 2019 15:44 #7909 by jlorek
Hi,

after successfully reading data as OpcUa Complex Data i need to serialize the data in JSON format to store the measurement in a NoSQL database.
I already figured out how to serialize the data in XML format, but i was surprised that besides the actual data, the serialized XML contains tons of namespace information and type definitions. The desired JSON structure i hope to achive should be very close to the Debug Output created by UAGenericObject.ToString("V"), which just contains name and actual values.

Is there alreay a built-in mechanism to serialize a UAGenericObject (or any other data object) to JSON?

Thanks,
Jens

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.160 seconds

      

 Recommend this on Google