diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-19 01:53:35 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-19 01:53:35 -0400 |
commit | 417c04076634ea87d7b3030a1acf46825da6e3e6 (patch) | |
tree | 218d176718205b792afe6c01275c1bc5fc595d9d /src/StardewModdingAPI.Toolkit/Serialisation/JsonHelper.cs | |
parent | 944b2995f1bf7719cfcfb9bafe713523dbd8883f (diff) | |
download | SMAPI-417c04076634ea87d7b3030a1acf46825da6e3e6.tar.gz SMAPI-417c04076634ea87d7b3030a1acf46825da6e3e6.tar.bz2 SMAPI-417c04076634ea87d7b3030a1acf46825da6e3e6.zip |
add data API (#468)
Diffstat (limited to 'src/StardewModdingAPI.Toolkit/Serialisation/JsonHelper.cs')
-rw-r--r-- | src/StardewModdingAPI.Toolkit/Serialisation/JsonHelper.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Serialisation/JsonHelper.cs b/src/StardewModdingAPI.Toolkit/Serialisation/JsonHelper.cs index dcc0dac4..cf2ce0d1 100644 --- a/src/StardewModdingAPI.Toolkit/Serialisation/JsonHelper.cs +++ b/src/StardewModdingAPI.Toolkit/Serialisation/JsonHelper.cs @@ -127,9 +127,10 @@ namespace StardewModdingAPI.Toolkit.Serialisation /// <summary>Serialize a model to JSON text.</summary> /// <typeparam name="TModel">The model type.</typeparam> /// <param name="model">The model to serialise.</param> - public string Serialise<TModel>(TModel model) + /// <param name="formatting">The formatting to apply.</param> + public string Serialise<TModel>(TModel model, Formatting formatting = Formatting.Indented) { - return JsonConvert.SerializeObject(model, this.JsonSettings); + return JsonConvert.SerializeObject(model, formatting, this.JsonSettings); } } } |