Closed chanskw closed 4 years ago
The requirement is that an JSON element is suppressed if the corresponding tuple attribute is marked as optional and has a value that is not present. Since SPL does not support a "null" value, SPL values can marked as "not present" in different ways.
It would be great, if the solution can be used for any of these ways. For example, an expression that is specified for SPL attributes indicating whether the SPL value is present or not present. In addition, it might be useful that the expression can be specified for any SPL attribute, even for sub values, for example, for C in tuple<rstring A, list<tuple<rstring C, rstring D, boolean isPresent_C>> B>
.
Same as #43
Assuming a tuple has the following type:
type
DataType = tuple<rstring a,list<rstring> b,list<rstring> c>;
If a tuple of this data type contains the following:
Data1: data={a="A", b=[], c=[]}
In this particular case, both b and c are empty lists.
Currently, the TupleToJson operator generates the following:
{"a":"A","b":[],"c":[]}
The user would like to see both "b" and "c" to be suppressed from the output.