I want to insert the below dictionary into MongoDB, using pymongo. However, I get the bson.errors.InvalidDocument: key 'www.utsa.edu' must not contain '.'
One of the threads suggests, "MongoDB not allowing using '.' in key", to check_keys=False. However, I think since Mongo, uses '.' to refer nested documents, I think, this is not a good method.
So my question is, how should I insert a web site or a domain name, as the primary key.
UniversityData = {
'www.utsa.edu': {
'Social Data': {
'Google Places':{
'Address': u'One UTSA Circle San Antonio, TX 78249, United States',
'Latitude': 42.46728199999999,
'Longitude': -83.42548599999999,
'rating': 3.6,
'types': [ u'education', u'university', u'students',u'college']
}
},
}
}