/// <summary>
        /// Reads from application/json message
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        private async static Task<OAuthROCRequest> ReadJson(System.Net.Http.HttpContent content)
        {
            var raw = await content.ReadAsStringAsync();
            var serializer = JsonSerializer.Create();
            var dicitionary = JsonConvert.DeserializeObject<Dictionary<string, string>>(raw);

            return FromDictionary(dicitionary);
        }
 public override object ReadFromStream(Type type, System.IO.Stream readStream, System.Net.Http.HttpContent content, IFormatterLogger formatterLogger)
 {
     using (var reader = new StreamReader(readStream))
     {
         var ussdRequest = new UssdRequestMessage();
         if (content != null)
         {
             var values = content.ReadAsStringAsync().Result.Split(new char[] {','});
             ussdRequest = new UssdRequestMessage() {TransactionId = values[0],TransactionTime = values[1],MSISDN = values[2],USSDServiceCode = values[3],USSDRequestString = values[4],response = Convert.ToBoolean(values[5]),ChargeCode = Convert.ToDecimal(values[6]),ChargingFlag = Convert.ToBoolean(values[7])};
             return ussdRequest;
         }
         else
         {
             throw new InvalidOperationException("Cannot DeSerialize Type");
         }
     }
     readStream.Close();
 }
        /// <summary>
        /// Reads from application/xml message
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        private async static Task<OAuthROCRequest> ReadXml(System.Net.Http.HttpContent content)
        {
            var raw = await content.ReadAsStringAsync();
            var root = XElement.Parse(raw);
            var dictionary = root.Elements()
                                 .ToDictionary(e => e.Name.LocalName, e => e.Value);

            return FromDictionary(dictionary);
        }
        /// <summary>
        /// Reads from application/x-www-form-urlencoded message
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        private async static Task<OAuthROCRequest> ReadForm(System.Net.Http.HttpContent content)
        {
            var raw = await content.ReadAsStringAsync();
            var tokens = raw.Split('&');
            var dictionary = new Dictionary<string, string>();
            foreach (var token in tokens)
            {
                var kp = token.Split('=');
                dictionary[Uri.UnescapeDataString(kp[0])] = Uri.UnescapeDataString(kp[1]);
            }

            return FromDictionary(dictionary);
        }