data_access_object.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:raw-data-repository 作者: all-of-us 项目源码 文件源码
def properties_to_json(self, dict_):
    """Converts ndb properties to their string representations for json.

    As a first step in converting ndb models to json, to_dict() is called.  This
    is sufficient if all the ndb properties are strings.  If not, subclasses
    should override this method to convert each field to its string
    representation. This base class implementation is a pass-through.

    Args:
      dict_: A deep copy of the dict as returned from ndb.Model.to_dict().
        For simple transformations fo the fields, this object can be modified
        and returned.

    Returns:
      A json representation of the model.
    """
    return dict_
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号