You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
How can you have the same key in a struct more than once? Isn't a struct key unique by definition? Would you please show how you are defining your struct?
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 :
Is the fullKeyList available outside the component or do I have to add a getter ?
Cédric
The text was updated successfully, but these errors were encountered: