Class ButtplugJsonMessageParser
java.lang.Object
io.github.blackspherefollower.buttplug4j.protocol.ButtplugJsonMessageParser
ButtplugJsonMessageParser.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFormat a single Buttplug message to JSON.formatJson(List<ButtplugMessage> msgs) Format Buttplug messages to JSON.Parse JSON to Buttplug messages.
-
Constructor Details
-
ButtplugJsonMessageParser
public ButtplugJsonMessageParser()Constructor.
-
-
Method Details
-
parseJson
Parse JSON to Buttplug messages.- Parameters:
json- JSON string- Returns:
- list of messages
- Throws:
ButtplugProtocolException- if parsing fails
-
formatJson
Format Buttplug messages to JSON.- Parameters:
msgs- list of messages- Returns:
- JSON string
- Throws:
ButtplugProtocolException- if formatting fails
-
formatJson
Format a single Buttplug message to JSON.- Parameters:
msg- message- Returns:
- JSON string
- Throws:
ButtplugProtocolException- if formatting fails
-