JsonDotNetEncoder.cs 626 B

123456789101112131415161718192021222324252627
  1. #if !BESTHTTP_DISABLE_SOCKETIO
  2. using System;
  3. using System.Collections.Generic;
  4. namespace BestHTTP.SocketIO.JsonEncoders
  5. {
  6. /*using Newtonsoft.Json;
  7. /// <summary>
  8. /// This class uses Newtonsoft's Json encoder (JSON .NET For Unity - http://u3d.as/5q2).
  9. /// </summary>
  10. public sealed class JsonDotNetEncoder : IJsonEncoder
  11. {
  12. public List<object> Decode(string json)
  13. {
  14. return JsonConvert.DeserializeObject<List<object>>(json);
  15. }
  16. public string Encode(List<object> obj)
  17. {
  18. return JsonConvert.SerializeObject(obj);
  19. }
  20. }*/
  21. }
  22. #endif