Skip to content

Commit

Permalink
Rename HumanReadableSerializer to JSONSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwp18 committed Mar 30, 2024
1 parent 5702687 commit d7769c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mqtt_ros_bridge/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def deserialize(serialized_message: bytes, message_type: Type[MsgLikeT]) -> MsgL
return deserialize_message(serialized_message, message_type)


class HumanReadableSerializer(Serializer):
class JSONSerializer(Serializer):
"""Serialize and deserialize messages using the default ROS message serializer."""

@staticmethod
Expand Down
4 changes: 2 additions & 2 deletions test/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
WStrings)

from mqtt_ros_bridge.msg_typing import MsgLikeT
from mqtt_ros_bridge.serializer import Serializer, ROSDefaultSerializer, HumanReadableSerializer
from mqtt_ros_bridge.serializer import Serializer, ROSDefaultSerializer, JSONSerializer


messages = [
Expand Down Expand Up @@ -48,4 +48,4 @@ def test_serializers() -> None:
"""Test that serialization works."""
for message in messages:
serialize_checker(message, ROSDefaultSerializer)
serialize_checker(message, HumanReadableSerializer)
serialize_checker(message, JSONSerializer)

0 comments on commit d7769c4

Please sign in to comment.