Skip to content

Commit

Permalink
Drop [JsonConverter] from PartialDate
Browse files Browse the repository at this point in the history
Otherwise, user (de)serialization of `PartialDate` objects will use
our reader, effectively preventing serialization.

No other changes should be needed; `PartialDate` is a not a top-level
type in the MB API, so its reader is used directly by the readers for
containing types.

Fixes #28.
  • Loading branch information
Zastai committed Nov 26, 2021
1 parent 9772066 commit d5754fc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions MetaBrainz.MusicBrainz/PartialDate.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using System;
using System.Globalization;
using System.Text;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;

using JetBrains.Annotations;

using MetaBrainz.MusicBrainz.Json.Readers;

namespace MetaBrainz.MusicBrainz;

/// <summary>A partial date. Can contain any or all of year, month and day.</summary>
[JsonConverter(typeof(PartialDateReader))]
[PublicAPI]
public sealed class PartialDate : IComparable<PartialDate>, IEquatable<PartialDate> {

Expand Down

0 comments on commit d5754fc

Please sign in to comment.