Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
w
Functions
_
a
c
d
e
g
h
i
l
p
r
s
t
u
w
Variables
_
a
b
c
d
f
i
l
m
n
p
r
s
t
u
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Variables
_
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
Files
File List
src
rosbridge_library
util
src/rosbridge_library/util/__init__.py
Go to the documentation of this file.
1
# try to import json-lib: 1st try ujson, 2nd try simplejson, else import standard python json
2
try
:
3
import
ujson
as
json
4
except
ImportError:
5
try
:
6
import
simplejson
as
json
7
except
ImportError:
8
import
json
9
10
# Differing string types for Python 2 and 3
11
import
sys
12
if
sys.version_info >= (3, 0):
13
string_types = (str,)
14
from
io
import
StringIO, BytesIO
15
else
:
16
string_types = (str, unicode)
# noqa: F821
17
from
StringIO
import
StringIO, StringIO
as
BytesIO
18
19
import
bson
20
try
:
21
bson.BSON
22
except
AttributeError:
23
raise
Exception(
24
"BSON installation does not support all necessary features. "
25
"Please use the MongoDB BSON implementation. "
26
"See: https://github.com/RobotWebTools/rosbridge_suite/issues/198"
27
)
rosbridge_library
Author(s): Jonathan Mace
autogenerated on Wed Feb 12 2025 03:14:53