Classes | |
class | ROSJSONException |
Functions | |
def | ros_message_to_json |
Convert ROS message to JSON representation. | |
def | ros_time_to_json |
def | value_to_json |
Convert value to JSON representation. | |
Variables | |
dictionary | _JSON_ESCAPE = {'\\':r'\\', '"':'\\"', '\b':r'\b', '\f':r'\f', '\n':r'\n', '\r':r'\r', '\t':r'\t'} |
Convert ROS message to JSON representation.
JSON representation is a simple dictionary of dictionaries, where a dictionary represents a ROS message. Time and duration are represented by their float value in seconds.
msg | rospy.Message: message instance to convert |
ROSJSONException | if msg cannot be converted to JSON |
Definition at line 93 of file rosjson_time.py.
def rosjson_time.rosjson_time.ros_time_to_json | ( | msg | ) |
Definition at line 102 of file rosjson_time.py.
Convert value to JSON representation.
v | Any: value to convert to JSON. Supported types are Python primitives (str, int, float, long, bool) as well as rospy Message-related types (Message, Time, Duration). |
ROSJSONException | if msg cannot be converted to JSON |
Definition at line 51 of file rosjson_time.py.
dictionary rosjson_time::rosjson_time::_JSON_ESCAPE = {'\\':r'\\', '"':'\\"', '\b':r'\b', '\f':r'\f', '\n':r'\n', '\r':r'\r', '\t':r'\t'} |
Definition at line 45 of file rosjson_time.py.