Skip to content

Commit 4a78f85

Browse files
Use Variant to Flattened String (special) from JSONtext
JSONtext 1.6.5 provides a new function that solves an issue, where an array (or cluster) of objects would fail to unflatten from string with error 1400. This error occurs when attempting to rebuild an object from variant data, when the variant data contains other variant elements. In this case the type information of the variant data does not automatically translate into the desired object data. This is only an issue for compound and array types. For example, an array of object `array[<object>]` would appear as `array[<variant<object>>]`, which has entirely different type data. 'Variant to Flattened String (special)' is a function implemented by JSONtext to address this issue by unpacking variant type information and returning only the raw type data, which effectively solves this issue. The function is private to JSONtext, which is why this commit imports the function into the vendor directory of this project with the license text added to the VI description. Closes #20
1 parent 3c594ef commit 4a78f85

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

-25.8 KB
Binary file not shown.

JSONtext Object Serialization.lvproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
<Item Name="JSON Serializable Tests.lvlib" Type="Library" URL="../JSON Serializable Tests/JSON Serializable Tests.lvlib"/>
3939
<Item Name="JSON Serializable Serializer Tests.lvlib" Type="Library" URL="../JSON Serializable Serializer Tests/JSON Serializable Serializer Tests.lvlib"/>
4040
</Item>
41+
<Item Name="Vendor" Type="Folder">
42+
<Item Name="__JSONtext__Variant to Flattened String (special).vi" Type="VI" URL="../Vendor/__JSONtext__Variant to Flattened String (special).vi"/>
43+
</Item>
4144
<Item Name=".vipc" Type="Document" URL="../.vipc"/>
4245
<Item Name=".vipb" Type="Document" URL="../.vipb"/>
4346
<Item Name="LICENSE.txt" Type="Document" URL="../LICENSE.txt"/>
26.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)