-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hello,
I need to load the keys dynamically so I would loop over a struct to get the keys to load.
But I could have the same key at multiple locations in my struct.
So I need to be able to detect if my current key is already defined in my serializer to avoid throwing an exception.
Here is part of my code :
serializer = new JSONSerializer()
.asInteger( "clientId" )
.asInteger( "dateEnd" )
.asInteger( "dateStart" )
.asString( "publishTarget" )
.asString( "ip" )
.asString( "language" )
...
;
for (key in struct){
if (NOT structKeyExists( serializer.fullKeyList, key)){
serializer = serializer.asAny(key);
}
}
Is the fullKeyList available outside the component or do I have to add a getter ?
Cédric
Metadata
Metadata
Assignees
Labels
No labels