JSON Serializing Qualified Value

What is the go-to way for serializing a tag value to JSON?

com.inductiveautomation.perspective.gateway.messages.json.QualifiedValueSerializer exists, but it is kinda lame.

It seems to fail on anything except primitive values, and I'd like to be able to serialize Document, Dataset, and Array data types.

There's a TagGson utility class with helpers to create a Gson instance capable of serializing almost anything in the tag system.

2 Likes