I am trying to read a record shown below as an input to a function.
However, when trying to walk through how record is being processed, it seems 
that the
sub-records is not serialized correctly(?):

$r:={
"id": "2",
"address": {
"street": "21 Orlando ct.",
"region": {
                "city": "Irvine",
                "county":"Orange"
        },
"state": "CA"

},
"related": ["VXQuery", "AQL"]
}
return remove-fields($r, [[“ address”,”region”, "city"]]);

VisitablePointable for $r gets the correct type tag (byte @[0] = 24). The tag 
for the sub record value of the “address” field seems
however to be a string (byte @[0] = 13), even though the debugger says that it 
is a “ARecordPointable”.

I am using

IVisitablePointable fieldValue = inputRecord.getFieldValues().get(j);
if(fieldValue.getByteArray()[0] == ATypeTag.RECORD.serialize()) {
// Do stuff
}

to test whether a field is a record or a AFlatPointable object (e.g. a AString).

Am I reading the type tag correctly? Is there any workaround for this?

Thank you.

-heri





Reply via email to