[Python-Dev] Dropping bytes "support" in json

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Apr 14 02:00:19 CEST 2009


Alexandre Vassalotti wrote:

>>print("Content-Type: application/json; charset=utf-8")
>>input_object = json.loads(sys.stdin.read())
>>output_object = do_some_work(input_object)
>>print(json.dumps(output_object))
>>print()

That assumes the encoding being used by stdout has
ascii as a subset.

-- 
Greg


More information about the Python-Dev mailing list