Replacing one character with another may lead to confusion and may cause critical issues in future.
For the instance, replacing .
with _DOT_
may work for now. Say in future you want to get back the original email for some verification; [no big deal] I can replace _DOT_
back with .
. This fails if someone has the email actual._DOT_@actualdot.com
The solution is to use email hash. I prefer md5 at the moment.
So the structure should be:
{
"<md5 hash of 'joel@dept.com'>": {
"EID":"0153"
},
"<md5 hash of 'Stan@dept.com'>": {
"EID":"0163"
}
}