[Django]-Python: list to JSON

9👍

Are you sure it’s actually a list containing unicode objects and not a list containing some database objects? The u"php" might just be the repr() of the object.

Try json.dumps([unicode(t) for t in tags_found]) or json.dumps(map(unicode, tags_found))

Leave a comment