JKISoftware / JKI-JSON-Serialization

JSON Serialization & Deserialization Library for LabVIEW
http://jki.net/tools#json
BSD 3-Clause "New" or "Revised" License
25 stars 9 forks source link

Icon for "Null Value.vi" should be "null" not "{}" #19

Closed robertbcalhoun closed 8 years ago

robertbcalhoun commented 8 years ago

JSON nulls and JSON empty string object are not the same thing. Icon should use the word "null", not "{}", to describe a null. (Content is correct, it's just the icon that is confusing.)

null values

See similar files in https://github.com/robertbcalhoun/JKI-JSON-Serialization/tree/feature/variant-attributes-1.1.2

tmaila commented 8 years ago

How would you represent empty clusters in LabVIEW?

tmaila commented 8 years ago

Fixed in build 1.1.3 that adds support for empty objects and separates them for null objects.

robertbcalhoun commented 8 years ago

You are a bugfixing monster!

I represent empty objects / empty clusters using a void variant, see my fork. It's a very natural use, in that a void variant with no attributes maps to {}, a void variant with one attribute to {"key":"value"} etc.

There is one issue, which is that void variants can't have names associated with them. That doesn't matter in my variant attribute code, because the top-level JSON object doesn't have a name and below I use attribute names to hold the name rather than a LabView datatype name. But when trying to convert void variants back to strongly-typed LabView data, I ran into an issue because the OpenG "name variant" feature throws an error if passed a void variant. Fixable, but it required changing more core code than I wanted to change given the challenges of merging LabView code.

I'll take a look at your code and see how you addressed this.

tmaila commented 8 years ago

I had some unusual downtime so I tried to fix as many bugs as I could before it gets busy again.