2
2
using UnityEngine ;
3
3
using System ;
4
4
using LootLocker . LootLockerEnums ;
5
- #if USE_LOOTLOCKER_ZERODEPJSON
5
+ #if LOOTLOCKER_USE_ZERODEPJSON
6
6
using LootLocker . ZeroDepJson ;
7
- #else //USE_LOOTLOCKER_ZERODEPJSON
7
+ #elif LOOTLOCKER_USE_NEWTONSOFTJSON
8
+ using Newtonsoft . Json ;
9
+ using Newtonsoft . Json . Serialization ;
10
+ #else
8
11
using LLlibs . Newtonsoft . Json . Serialization ;
9
12
using LLlibs . Newtonsoft . Json ;
10
13
#endif
@@ -18,9 +21,9 @@ namespace LootLocker
18
21
19
22
public static class LootLockerJsonSettings
20
23
{
21
- #if USE_LOOTLOCKER_ZERODEPJSON
24
+ #if LOOTLOCKER_USE_ZERODEPJSON
22
25
public static readonly JsonOptions Default = new JsonOptions ( JsonSerializationOptions . Default & ~ JsonSerializationOptions . SkipGetOnly ) ;
23
- #else //USE_LOOTLOCKER_ZERODEPJSON
26
+ #else //LOOTLOCKER_USE_ZERODEPJSON
24
27
public static readonly JsonSerializerSettings Default = new JsonSerializerSettings
25
28
{
26
29
ContractResolver = new DefaultContractResolver { NamingStrategy = new SnakeCaseNamingStrategy ( ) } ,
@@ -31,7 +34,7 @@ public static class LootLockerJsonSettings
31
34
32
35
public static class LootLockerJson
33
36
{
34
- #if USE_LOOTLOCKER_ZERODEPJSON
37
+ #if LOOTLOCKER_USE_ZERODEPJSON
35
38
public static string SerializeObject ( object obj )
36
39
{
37
40
return SerializeObject ( obj , LootLockerJsonSettings . Default ) ;
@@ -51,7 +54,7 @@ public static T DeserializeObject<T>(string json, JsonOptions options)
51
54
{
52
55
return Json . Deserialize < T > ( json , options ?? LootLockerJsonSettings . Default ) ;
53
56
}
54
- #else //USE_LOOTLOCKER_ZERODEPJSON
57
+ #else //LOOTLOCKER_USE_ZERODEPJSON
55
58
public static string SerializeObject ( object obj )
56
59
{
57
60
return SerializeObject ( obj , LootLockerJsonSettings . Default ) ;
@@ -128,9 +131,9 @@ public class LootLockerResponse
128
131
public string EventId { get ; set ; }
129
132
130
133
public static void Deserialize < T > ( Action < T > onComplete , LootLockerResponse serverResponse ,
131
- #if USE_LOOTLOCKER_ZERODEPJSON
134
+ #if LOOTLOCKER_USE_ZERODEPJSON
132
135
JsonOptions options = null
133
- #else //USE_LOOTLOCKER_ZERODEPJSON
136
+ #else //LOOTLOCKER_USE_ZERODEPJSON
134
137
JsonSerializerSettings options = null
135
138
#endif
136
139
)
@@ -140,9 +143,9 @@ public static void Deserialize<T>(Action<T> onComplete, LootLockerResponse serve
140
143
}
141
144
142
145
public static T Deserialize < T > ( LootLockerResponse serverResponse ,
143
- #if USE_LOOTLOCKER_ZERODEPJSON
146
+ #if LOOTLOCKER_USE_ZERODEPJSON
144
147
JsonOptions options = null
145
- #else //USE_LOOTLOCKER_ZERODEPJSON
148
+ #else //LOOTLOCKER_USE_ZERODEPJSON
146
149
JsonSerializerSettings options = null
147
150
#endif
148
151
)
0 commit comments