Fix null values handling in C# Json serialization
It didn't replace prefab object reference if replaced with null in the prefab instance.
This commit is contained in:
@@ -73,7 +73,7 @@ namespace FlaxEngine.Json
|
||||
ContractResolver = new ExtendedDefaultContractResolver(isManagedOnly),
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
|
||||
TypeNameHandling = TypeNameHandling.Auto,
|
||||
NullValueHandling = NullValueHandling.Ignore,
|
||||
NullValueHandling = NullValueHandling.Include,
|
||||
ObjectCreationHandling = ObjectCreationHandling.Auto,
|
||||
};
|
||||
if (ObjectConverter == null)
|
||||
@@ -276,6 +276,11 @@ namespace FlaxEngine.Json
|
||||
cache.IsDuringSerialization = false;
|
||||
Current.Value = cache;
|
||||
|
||||
/*// Debug json string reading
|
||||
cache.MemoryStream.Initialize(jsonBuffer, jsonLength);
|
||||
cache.Reader.DiscardBufferedData();
|
||||
string json = cache.Reader.ReadToEnd();*/
|
||||
|
||||
cache.MemoryStream.Initialize(jsonBuffer, jsonLength);
|
||||
cache.Reader.DiscardBufferedData();
|
||||
var jsonReader = new JsonTextReader(cache.Reader);
|
||||
|
||||
Reference in New Issue
Block a user