Variant name missing after JSON serialisation

Issue #45 resolved
Former user created an issue

When attempting to serialize a cluster containing a named variant to JSON, the variant's name is omitted from the resulting JSON string.

This seems to be caused by the fact that the "NI_Data Type.lvlib:Get Type Information.vi" function which is used to determine the data name, tries to retrieve the name of the data stored within the variant instead of the variant itself.

If the data inside the variant is given a name, then this name will be used instead of an empty string.

Comments (2)

  1. James Powell repo owner

    The Library can’t tell which name you actually want. Another User may want to use the name of the contained data. Personally, I recommend using “subJSON” instead of Variants for these uses (that means a string with a name starting with the tag “<JSON>).

  2. Log in to comment