Empty strings and null

Issue #6 resolved
James Powell repo owner created an issue

The LabVIEW default for a string is an empty string. But default JSON Value is null.

So there is an issue to decide about what to return from <JSON> outputs during things like error conditions, and what to do when an input, supposed to be JSON, is empty. Possibilities: For Outputs labeled <JSON>: * never return empty strings; use null instead * return empty strings to indicate a lack of a JSON value to provide, due to error, or not finding a Value to return (in case of a "Find" operation)

Outputs JSON-labelled Inputs * accept an empty string (or any just whitespace?) as equivalent to a null * accept empty as meaning a no-op of whatever they are doing. Could even indicate a "Delete" in methods like "Insert".

Note that outputs are often connected to inputs, so we need a consistent set of choices.

Currently, an empty string produces buggy non-JSON output in the INSERT functions, so this needs to be fixed, regardless.

Comments (1)

  1. Log in to comment