json_encoder.py 文件源码

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

项目:floto 作者: babbel 项目源码 文件源码
def load_string(json_string):
        """Deserialize `json_string` to Python Object. If `json_string` is not a valid json
        document, just return `json_string`. It is used in the context of activity results: floto
        handles str and JSON serialized results.

        Parameters
        ----------
        json_string : any

        Returns
        -------

        obj

        """
        try:
            j = json.loads(json_string)
        except (TypeError, json.JSONDecodeError):
            j = json_string
        return j
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号