You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
538 B
23 lines
538 B
#if !BESTHTTP_DISABLE_SIGNALR && BESTHTTP_SIGNALR_WITH_JSONDOTNET |
|
|
|
using System.Collections.Generic; |
|
|
|
using Newtonsoft.Json; |
|
|
|
namespace BestHTTP.SignalR.JsonEncoders |
|
{ |
|
public sealed class JSonDotnetEncoder : IJsonEncoder |
|
{ |
|
public string Encode(object obj) |
|
{ |
|
return JsonConvert.SerializeObject(obj); |
|
} |
|
|
|
public IDictionary<string, object> DecodeMessage(string json) |
|
{ |
|
return JsonConvert.DeserializeObject<Dictionary<string, object>>(json); |
|
} |
|
} |
|
} |
|
|
|
#endif |