static Set<String> identityAttributeJsonToSet(JsonValue identityAttributeJson){
  if (identityAttributeJson.isString()) {
    return Collections.singleton(identityAttributeJson.asString());
  }
  if (identityAttributeJson.isList()) {
    Set<String> attributeValues=new HashSet<>();
    for (    JsonValue value : identityAttributeJson) {
      if (value.isString()) {
        attributeValues.add(value.asString());
      }
 else {
        attributeValues.add(value.toString());
      }
    }
    return attributeValues;
  }
  return Collections.singleton(identityAttributeJson.toString());
}

static Set < String > identityAttributeJsonToSet ( JsonValue identityAttributeJson ) { if ( identityAttributeJson . isString ( ) ) { return Collections . singleton ( identityAttributeJson . asString ( ) ) ; } if ( identityAttributeJson . isList ( ) ) { Set < String > attributeValues = new HashSet < > ( ) ; for ( JsonValue value : identityAttributeJson ) { if ( value . isString ( ) ) { attributeValues . add ( value . asString ( ) ) ; } else { attributeValues . add ( value . toString ( ) ) ; } } return attributeValues ; } return Collections . singleton ( identityAttributeJson . toString ( ) ) ; }
transforms json representing an identity attribute into a representative set of strings . < p / > if the json is a single value , that value is serialized into a string and returned as a single entry set . otherwise if it is a list of values , each value is serialized into a string and returned as a collective set .
