Inconsistent behavior converting <JOBJ> Map to JSON Text between variant and VIM methods

Issue #122 new
Christopher Stryker created an issue

I see different behavior when using “Variant to JSON Text.vi” directly as opposed to when I use “To JSON Text.vim” if I use an input Map with the <JOBJ> tag:

Full disclosure, I’m using the library directly and don’t have it installed to vi.lib and by extension, no palette; as such I’m /assuming/ that To JSON Text.vim is actually supported to begin with and not intended to be hidden.

Comments (3)

  1. James Powell repo owner

    You can follow a long conversation about the underlying issue here: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Malleable-control-labels/idi-p/3782013

    TLDR: VIM inputs adapt to an inputs data type, but not to the wire name. For an item inside a cluster, the name is part of the type, but for a bare item it is not. Thus for bare items the <tag> trick does not work with VIMs (but will with Variants).

    Annoying, but unfixable.

    The VIMs, BTW, are on the main palette, but the Variant versions are on a deeper, needed less often, subpalette.

  2. Christopher Stryker reporter

    That makes sense. One thing I think I might be missing, however, is the purpose of making “To JSON Text” a VIM at all. I see the use case for the JSON->LVData case, but I don’t see how the the LVData->JSON scenario adds a lot of value (aside from get rid of a coercion dot on the top level block diagram).

  3. James Powell repo owner

    I hope to eventually use the Type-Specialisation Structure to add performance improvements for simple data types. So, for example, avoiding Variant-handling overhead on converting just a DBL.

  4. Log in to comment