mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Core - Removed JsonConvert.DefaultSettings assignement
This could break libraries used by plugins, this closes #501
This commit is contained in:
1 parent
81bb278abe
commit
190d64b497
12 files changed
+56
-44
No files matched your search
+2
-2
@@ -74,7 +74,7 @@ namespace Artemis.Core
|
||||
Entity.Condition = Condition.Entity;
|
||||
Condition.Save();
|
||||
|
||||
Entity.Value = JsonConvert.SerializeObject(Value);
|
||||
Entity.Value = JsonConvert.SerializeObject(Value, Constants.JsonConvertSettings);
|
||||
Entity.Order = Order;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Artemis.Core
|
||||
? new DataModelConditionGroup(null, Entity.Condition)
|
||||
: new DataModelConditionGroup(null);
|
||||
|
||||
Value = (Entity.Value == null ? default : JsonConvert.DeserializeObject<TProperty>(Entity.Value))!;
|
||||
Value = (Entity.Value == null ? default : JsonConvert.DeserializeObject<TProperty>(Entity.Value, Constants.JsonConvertSettings))!;
|
||||
Order = Entity.Order;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,8 +209,8 @@ namespace Artemis.Core
|
||||
try
|
||||
{
|
||||
staticValue = parameterType != null
|
||||
? JsonConvert.DeserializeObject(Entity.ParameterStaticValue, parameterType)
|
||||
: JsonConvert.DeserializeObject(Entity.ParameterStaticValue);
|
||||
? JsonConvert.DeserializeObject(Entity.ParameterStaticValue, parameterType, Constants.JsonConvertSettings)
|
||||
: JsonConvert.DeserializeObject(Entity.ParameterStaticValue, Constants.JsonConvertSettings);
|
||||
}
|
||||
// If deserialization fails, use the type's default
|
||||
catch (JsonSerializationException e)
|
||||
@@ -252,7 +252,7 @@ namespace Artemis.Core
|
||||
ParameterPath?.Save();
|
||||
Entity.ParameterPath = ParameterPath?.Entity;
|
||||
|
||||
Entity.ParameterStaticValue = JsonConvert.SerializeObject(ParameterStaticValue);
|
||||
Entity.ParameterStaticValue = JsonConvert.SerializeObject(ParameterStaticValue, Constants.JsonConvertSettings);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in new issue
Block a user