ujson库的Python源代码如下。
# encoding: utf-8
# module ujson
# from /home/marty/dj/local/lib/python2.7/site-packages/ujson.so
# by generator 1.136
# no doc
# no imports
# Variables with simple values
__version__ = '1.33'
# functions
def decode(*args, **kwargs): # real signature unknown
""" Converts JSON as string to dict object structure. Use precise_float=True to use high precision float decoder. """
pass
def dump(*args, **kwargs): # real signature unknown
""" Converts arbitrary object recursively into JSON file. Use ensure_ascii=false to output UTF-8. Pass in double_precision to alter the maximum digit precision of doubles. Set encode_html_chars=True to encode < > & as unicode escape sequences. """
pass
def dumps(*args, **kwargs): # real signature unknown
""" Converts arbitrary object recursivly into JSON. Use ensure_ascii=false to output UTF-8. Pass in double_precision to alter the maximum digit precision of doubles. Set encode_html_chars=True to encode < > & as unicode escape sequences. """
pass
def encode(*args, **kwargs): # real signature unknown
""" Converts arbitrary object recursivly into JSON. Use ensure_ascii=false to output UTF-8. Pass in double_precision to alter the maximum digit precision of doubles. Set encode_html_chars=True to encode < > & as unicode escape sequences. """
pass
def load(*args, **kwargs): # real signature unknown
""" Converts JSON as file to dict object structure. Use precise_float=True to use high precision float decoder. """
pass
def loads(*args, **kwargs): # real signature unknown
""" Converts JSON as string to dict object structure. Use precise_float=True to use high precision float decoder. """
pass
# no classes
ujson只使用此代码执行任何方法。名为ujson.so
的外部文件是shared library.
执行# from
,# module
,# by generator
,# no doc
,no imports
条评论对此代码有影响(我知道# encoding
指定文件的编码)
来自pypi
UltraJSON是一个超纯JSON编码器和解码器,用纯C编写,带有Python 2.5+和3的绑定。
我的问题,
ujson.loads(my_string)
)?