Skip to content

Commit

Permalink
Merge #3937 Fix loading of legacy registry.json files
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Dec 5, 2023
2 parents 2c137f6 + 5503695 commit 5c77a68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file.
- [Multiple] Show recommendations of full changeset with opt-out (#3892 by: HebaruSan; reviewed: techman83)
- [Multiple] Dutch translation and icon duplication guardrails (#3897 by: HebaruSan; reviewed: techman83)
- [GUI] Shorten toolbar button labels (#3903 by: HebaruSan; reviewed: techman83)
- [Multiple] Refactor repository and available module handling (#3904, #3907, #3908, #3935 by: HebaruSan; reviewed: techman83)
- [Multiple] Refactor repository and available module handling (#3904, #3907, #3908, #3935, #3937 by: HebaruSan; reviewed: techman83)
- [Multiple] Parallelize for performance, relationship resolver improvements (#3917 by: HebaruSan; reviewed: techman83)
- [Multiple] Modernize administrator and Mono version checks (#3933 by: HebaruSan; reviewed: techman83)

Expand Down
6 changes: 5 additions & 1 deletion Core/Converters/JsonAlwaysEmptyObjectConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ namespace CKAN
public class JsonAlwaysEmptyObjectConverter : JsonConverter
{
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
=> Activator.CreateInstance(objectType);
{
// Read and discard this field's object (without this, loading stops!)
_ = JToken.Load(reader);
return Activator.CreateInstance(objectType);
}

public override bool CanWrite => true;
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Expand Down

0 comments on commit 5c77a68

Please sign in to comment.