How to JSON encode Entities?

前端 未结 4 1115
我寻月下人不归
我寻月下人不归 2021-01-16 18:26

I\'m getting started with Google App Engine. I want to make AJAX chat like Twitter.

class ChatMessage(db.Model):
  message = db.StringProperty()
  created =          


        
4条回答
  •  北海茫月
    2021-01-16 19:05

    In App Engine Python you can use this script to encode db.Models to JSON. You may have to customize some parts, like the DateTime formatting.

    http://code.google.com/p/google-app-engine-samples/source/browse/trunk/geochat/json.py?r=55

提交回复
热议问题