In the EvaluationContext we are storing all the attributes in different Map based on the type of the data.
private final Map<String, Integer> integerAttributes;
private final Map<String, String> stringAttributes;
private final Map<String, Boolean> booleanAttributes;
final Map<String, String> jsonAttributes;
With this implementation, it means that we can have multiple attributes with the same key name if they have different types.
It means that I can do something like this:
ctx.addStringAttribute("key1","value);
ctx.addIntegerAttribute("key1",value);
Since most of the providers are using JSON or any structured key-value layer to send the data to the backend I wonder if it will not cause problems to have multiple times the same key.
For example in go-feature-flag this is an issue because we are calling a rest API with a JSON body and we will override one of the keys when creating the JSON Object.
In the
EvaluationContextwe are storing all the attributes in differentMapbased on the type of the data.With this implementation, it means that we can have multiple attributes with the same key name if they have different types.
It means that I can do something like this:
Since most of the providers are using JSON or any structured key-value layer to send the data to the backend I wonder if it will not cause problems to have multiple times the same key.
For example in
go-feature-flagthis is an issue because we are calling a rest API with a JSON body and we will override one of the keys when creating the JSON Object.