__init__.py
Go to the documentation of this file.
00001 # try to import json-lib: 1st try usjon, 2nd try simplejson, else import standard python json
00002 try:
00003     import ujson as json
00004 except ImportError:
00005     try:
00006         import simplejson as json
00007     except ImportError:
00008         import json
00009 
00010 # Differing string types for Python 2 and 3
00011 import sys
00012 if sys.version_info >= (3, 0):
00013     string_types = (str,)
00014     from io import StringIO
00015 else:
00016     string_types = (str, unicode)
00017     from StringIO import StringIO
00018 
00019 import bson
00020 try:
00021     bson.BSON
00022 except AttributeError:
00023     raise Exception(
00024         "BSON installation does not support all necessary features. "
00025         "Please use the MongoDB BSON implementation. "
00026         "See: https://github.com/RobotWebTools/rosbridge_suite/issues/198"
00027     )


rosbridge_library
Author(s): Jonathan Mace
autogenerated on Thu Jun 6 2019 21:51:43