I'm using the bulkloader to upload data into my App Engine data storage.
I can't seem to store a dictionary into a JsonProperty and I am getting the following error:
BadValueError: Unsupported type for property nearby_countries: <type 'dict'>
My model defines this property as a JsonProperty:
nearby_countries = ndb.JsonProperty()
The only workaround I found seems to store a json.dumps() of my value instead but I guess this basically storing the string representation of the dictionary rather than the dictionary itself.
My understanding of the JsonProperty is that it takes a python object as the value and that I should not be bothered about the JSON serialization which ndb will take care of. Am I correct?
Value is a Python object (such as a list or a dict or a string) that is serializable using Python's json module; the Datastore stores the JSON serialization as a blob.