-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
api: datastoreIssues related to the googleapis/python-ndb API.Issues related to the googleapis/python-ndb API.
Description
We have datastore entities with a property that holds JSON data. The entities itself were written using a datastore library in a different language than Python. The data includes unescaped UTF-8 characters (which should be legal in JSON, and is generally well supported).
When using an NDB JsonProperty to access this data from within Python, however, this breaks. This is because JsonProperty only supports ascii data:
def _from_base_type(self, value):
if not isinstance(value, str):
value = value.decode("ascii")
return json.loads(value)Could JsonProperty be adapted to decode utf-8, to have better interoperability between different languages working on the same data?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the googleapis/python-ndb API.Issues related to the googleapis/python-ndb API.