#if !BESTHTTP_DISABLE_SOCKETIO using System.Collections.Generic; using LitJson; namespace BestHTTP.SocketIO.JsonEncoders { /// /// This IJsonEncoder implementation uses the LitJson library located in the Examples\LitJson directory. /// public sealed class LitJsonEncoder : IJsonEncoder { public List Decode(string json) { JsonReader reader = new JsonReader(json); return JsonMapper.ToObject>(reader); } public string Encode(List obj) { JsonWriter writer = new JsonWriter(); JsonMapper.ToJson(obj, writer); return writer.ToString(); } } } #endif