Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purge more bloat from registry.json #2564

Merged
merged 2 commits into from
Nov 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Core/Registry/RegistryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,7 @@ private string Serialize()
using (JsonTextWriter writer = new JsonTextWriter(sw))
{
writer.Formatting = Formatting.Indented;
writer.Indentation = 1;
writer.IndentChar = '\t';
writer.Indentation = 0;

JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(writer, registry);
Expand Down
7 changes: 5 additions & 2 deletions Core/Types/CkanModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -259,7 +260,8 @@ public class CkanModule : IEquatable<CkanModule>
[JsonProperty("download_hash", NullValueHandling = NullValueHandling.Ignore)]
public DownloadHashesDescriptor download_hash;

[JsonProperty("download_content_type", NullValueHandling = NullValueHandling.Ignore)]
[JsonProperty("download_content_type", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[DefaultValue("application/zip")]
public string download_content_type;

[JsonProperty("identifier", Required = Required.Always)]
Expand All @@ -274,7 +276,8 @@ public class CkanModule : IEquatable<CkanModule>
[JsonProperty("ksp_version_min", NullValueHandling = NullValueHandling.Ignore)]
public KspVersion ksp_version_min;

[JsonProperty("ksp_version_strict")]
[JsonProperty("ksp_version_strict", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[DefaultValue(false)]
public bool ksp_version_strict = false;

[JsonProperty("license")]
Expand Down
7 changes: 5 additions & 2 deletions Core/Types/ModuleInstallDescriptor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
Expand Down Expand Up @@ -26,10 +27,12 @@ public class ModuleInstallDescriptor : ICloneable
[JsonProperty("find_regexp", NullValueHandling = NullValueHandling.Ignore)]
public string find_regexp;

[JsonProperty("find_matches_files")]
[JsonProperty("find_matches_files", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[DefaultValue(false)]
public bool find_matches_files;

[JsonProperty("install_to", Required = Required.Always)]
[JsonProperty("install_to", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[DefaultValue("GameData")]
public string install_to;

[JsonProperty("as", NullValueHandling = NullValueHandling.Ignore)]
Expand Down