/// <summary> /// Serializes a single <see cref="ButtplugMessage"/> object into a JSON string for a specified version of the schema. /// </summary> /// <param name="aMsg"><see cref="ButtplugMessage"/> object</param> /// <param name="clientSchemaVersion">Target schema version</param> /// <returns>JSON string representing a B******g message</returns> public string Serialize([NotNull] ButtplugMessage aMsg, uint clientSchemaVersion) { return(Serialize(new [] { aMsg }, clientSchemaVersion)); }
/// <summary> /// Converts a single <see cref="ButtplugMessage"/> into a JSON string. /// </summary> /// <param name="aMsg">Message to convert.</param> /// <returns>The JSON string representation of the message.</returns> protected string Serialize(ButtplugMessage aMsg) { return(_parser.Serialize(aMsg, 1)); }