Created
November 8, 2013 18:42
-
-
Save ajamaica/7375558 to your computer and use it in GitHub Desktop.
Query de App Engine en Python a dict para json. Después solo usa json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gql_json_parser(query_obj): | |
result = [] | |
for entry in query_obj: | |
result.append(dict([(p, unescape(unicode(getattr(entry, p)))) for p in entry.properties()])) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excelente!