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

Fix bugs and add features #941

Merged
merged 19 commits into from
Jul 14, 2024
Merged

Conversation

EdwardCooke
Copy link
Collaborator

@EdwardCooke EdwardCooke commented Jul 14, 2024

Fix #922 - large files fail to parse
Fix #893 - JSON Compatible and non numeric numbers (.inf/nan/e+)
BREAKING Fix #891 - Use ISO8601 for Json Dates by default.
BREAKING Feat: #890 - Support custom converters by attributes
Feat: #884 - IEnumerable and other interface support in AoT
Fix #845 - DateTime/Json Compatible
Feat: #781 - Case insensitive field and property matching
Feat #763 - Non nullable properties/fields throw exception when enabled.
Feat #763 - Required fields throw exception when not set when enabled.
Feat #586 - EnumMember attribute on enums
Additionally
BREAKING - Support easily serializing/deserializing objects in IYamlTypeConverter implementations.
Removed the .net 7 target


Notes:

  • The ITypeConverter object is now passed to many methods and is expected when some are called. You can get the typeconverter by calling BuildTypeConverter on the serializerbuilder and deserializerbuilder. This typeconverter should be treated as a singleton and injected into the constructor of your class.

  • The IPropertyDescriptor is now passed into a lot of methods. It can be safely disregarded if you don't need it. It contains information about the property containing the object being deserialized.

  • The delegates ObjectSerializer and ObjectDeserializer are also being passed around. They can be disregarded if you don't need them.

  • To revert to the old date/time formats for JsonCompatable remove the DateTime8601Converter and add the DateTimeConverter with the doubleQuotes constructor parameter set to true. Example:

    new SerializerBuilder()
        .WithoutTypeConverter<YamlDotNet.Serialization.Converters.DateTime8601Converter>()
        .WithTypeConverter(new YamlDotNet.Serialization.Converters.DateTimeConverter(doubleQuotes: true))
    .Build();

@EdwardCooke EdwardCooke merged commit 8808c6f into aaubry:master Jul 14, 2024
1 check passed
@aaubry
Copy link
Owner

aaubry commented Jul 14, 2024

This feature has been released in version 16.0.0.

@martincostello
Copy link

The changes from 8c1dbad are breaking but aren't listed in the release notes. Would be good to update them to include a note of that too.

@EdwardCooke
Copy link
Collaborator Author

Release notes updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants