// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using Newtonsoft.Json.Linq; namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { /// /// Defines a common interface for message serializers. /// public interface IMessageSerializer { /// /// Serializes a Message to a JObject. /// /// The message to be serialized. /// A JObject which contains the JSON representation of the message. JObject SerializeMessage(Message message); /// /// Deserializes a JObject to a Messsage. /// /// The JObject containing the JSON representation of the message. /// The Message that was represented by the JObject. Message DeserializeMessage(JObject messageJson); } }