Changes between Initial Version and Version 1 of Ticket #29147, comment 5


Ignore:
Timestamp:
Feb 23, 2018, 8:19:20 AM (7 years ago)
Author:
Javier Buzzi

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29147, comment 5

    initial v1  
    11As i understood it was that `to_python()` is the representation of the data in python, postgres could save it and do with it what it wants; store it binary/urlencode it/ encrypt it for all it wants, but from a python perspective that data to me, needs to be represented as a dict/simple type (if it is "hello") -- i still don't understand why this is invalid.
     2
     3
     4{{{
     5$ echo '"hello"' | docker run --rm -i python:3.6 python -c 'import json, sys; print(json.load(sys.stdin))'
     6hello
     7$ echo '{"hello": "hi"}' | docker run --rm -i python:3.6 python -c 'import json, sys; print(json.load(sys.stdin))'
     8{'hello': 'hi'}
     9$ echo '{"hello": "hi"}' | docker run --rm -i python:2.7 python -c 'import json, sys; print(json.load(sys.stdin))'
     10{u'hello': u'hi'}
     11$ echo '"hello"' | docker run --rm -i python:2.7 python -c 'import json, sys; print(json.load(sys.stdin))'
     12hello
     13}}}
Back to Top