def GET(self, uid):
user = {}
callback = web.input().get("jsonp")
try:
user = models.user(uid).load()
# JS is bad at numbers
user["id64"] = str(user["id64"])
except: pass
web.header("Content-Type", jsonMimeType)
jsonobj = json.dumps(user)
if not callback:
return jsonobj
else:
return callback + '(' + jsonobj + ');'
评论列表
文章目录