Python's json.load(sys.stdin) gets me u'...' instead of double quotes around Strings

print will just print python's representation of the object you are passing (which you deserialized with json.load). Try this:

import sys, json;
data = json.load(sys.stdin)
for station in data["data"]:
    print(json.dumps(station))

json.dumps serializes a python object back to json.


You've misunderstood what json.load does: it deserializes from JSON, ie it creates Python objects from JSON strings.

But I can't really understand what you're doing; if you already have JSON being passed in from stdin, why are you trying to convert it at all? Pass it straight on to your API.