YamlDotNet

YamlDotNet is a .NET library for YAML

MIT License

Downloads
4
Stars
2.5K
Committers
113

Bot releases are hidden (Show)

YamlDotNet - Release 8.1.0

Published by aaubry over 3 years ago

New features and improvements

  • Made CachedTypeInspector thread safe #386
    Previously, using an instance of Serializer or Deserializer was not thread-safe,
    although the intention was for them to be thread safe. The only mutable state is
    inside CachedTypeInspector and was not properly protected against concurrent mutation.

Other fixes

  • Fix type conflicts when targeting frameworks without nullability attributes #460
YamlDotNet - Release 8.1.1

Published by aaubry over 3 years ago

Bug fixes

  • Improve compliance with the official YAML test suite: #467, #469 and #475.

  • Make YamlMemberAttribute.DefaultValuesHandling actually usable. Fixes #466.

  • Actually inherit YamlIgnore attributes: #481.

New features

  • Add LowerCaseNamingConvention: #477.
YamlDotNet - Release 8.1.2

Published by aaubry over 3 years ago

Bug fixes

  • Merge #483 - Allow values after DocumentStart token
  • Merge #497 - Fix indentation check for first content line - fixes #492
YamlDotNet - Release 9.1.0

Published by aaubry over 3 years ago

Improvements

  • Small performance improvements. Addresses [#519]
  • [#490] Add anchor/alias support in JsonEventEmitter
  • [#540] Allow block style in multiline scalars with trailing spaces
  • [#482] Add support for private properties in the serializer.

Bugfixes

  • Fix KeyNotFoundException in WithoutTypeInspector (fixes [#507])
  • [#539] Fix deserialization for Nullable types.
  • [#491] Disallow usage of alias before anchor declaration
  • [#542] Fix the order of YamlMappingNode items
    YamlMappingNode will now return the items in the order they appear inside the document.
YamlDotNet - Release 9.1.1

Published by aaubry over 3 years ago

  • Fix off by one error when resizing InsertionQueue

This fixes a critical bug that was causing failures while parsing Yaml documents. If you are using release 9.1.0, please use this version instead.

YamlDotNet - Release 9.1.2

Published by aaubry over 3 years ago

  • Fix writePtr decrementation in InsertionQueue [#558]

This fixes another critical bug that was causing failures while parsing Yaml documents. If you are using release 9.1.1, please use this version instead.

YamlDotNet - Release 9.1.3

Published by aaubry over 3 years ago

  • Fix an error when a stream returns less than the requested amount of bytes
    Fixes #560
YamlDotNet - Release 9.1.4

Published by aaubry over 3 years ago

  • Fix LookAheadBuffer trying to read from the stream after reaching its end
YamlDotNet - Change the default value handling behavior.

Published by aaubry about 5 years ago

New features and improvements

  • Change the default value handling behavior. Fixes #427
    This is a breaking change to the default behaviour of the serializer, which will now always emit null and default values.
    It is possible to configure this behaviour by using the ConfigureDefaultValuesHandling method on SerializerBuilder.

    More details are available in the documentation.

  • Add default implementations for the following non-generic collections to DefaultObjectFactory:

    • IEnumerable
    • ICollection
    • IList
    • IDictionary
  • Remove obsolete and unused SerializationOptions enum. Fixes #438

  • Throw descriptive exceptions when using the "linq" methods of YamlNode. Relates to #437

Bug fixes

  • Never emit document end indicator on stream end. Fixes #436
  • Fix exception when deserializing an interface. Fixes #439
YamlDotNet - Add support for nullable references and netstandard 2.1

Published by aaubry about 5 years ago

Release 7.0.0

Added support for nullable references and netstandard 2.1.

Enabling nullable references exposed many potential bugs where the code assumed
that a reference would not be null, but where it was possible for it to be null.
In most cases this did not cause an error because of the way the code was being used.

Because fixing these problems required some breaking changes, a few improvements were made to the code base to take advantage of modern C# constructs.

Overall, the following breaking changes were made:

  • Removed the default constructor from most exceptions, because that would cause some uninitialized properties.

  • Made the ParsingEvent concretizations sealed. There is no point in inheriting from these because the library assumes that they form a closed set.

  • Made many classes sealed, since they are not intended to be extended.

  • YamlDocument now throws an exception if is has no root node after loading. This should only happen when loading from an IParser that returns invalid data or is in an invalid state.

The following APIs were made obsolete (but still work as before):

  • Refactored the extension methods to IParser to have better names with a more sensible semantic. The previous extension methods, Expect<T>, Allow<T>, Peek<T> and Accept<T> are still available but have been deprecated. The new extension methods are:

    • T Consume<T>() where T : ParsingEvent
      Ensures that the current event is of the specified type, returns it and moves to the next event. Throws an exception if the next event is not of the expected type.

    • bool TryConsume<T>(out T @event) where T : ParsingEvent
      If the event is of the specified type, returns it and moves to the next event, otherwise returns null.

    • T Require<T>() where T : ParsingEvent
      Enforces that the current event is of the specified type.

    • bool Accept<T>(out T @event) where T : ParsingEvent
      Checks whether the current event is of the specified type.

  • Made the constructor of all naming conventions obsolete. Instead each has a static property named Instance. There was no point in creating multiple instances of those classes.
    Instead of:

    new SerializerBuilder()
        .WithNamingConvention(new CamelCaseNamingConvention());
    

    Use:

    new SerializerBuilder()
        .WithNamingConvention(CamelCaseNamingConvention.Instance);
    
YamlDotNet - Improve conformance with the official test suite

Published by aaubry about 5 years ago

Release 6.1.2

Improves conformance with the official test suite:

  • W4TN (Spec Example 9.5. Directives Documents)
  • 2LFX (Spec Example 6.13. Reserved Directives [1.3])
  • 6LVF (Spec Example 6.13. Reserved Directives)
  • S3PD (Spec Example 8.18. Implicit Block Mapping Entries)
  • NHX8 (Empty Lines at End of Document)
  • 2JQS (Block Mapping with Missing Keys)
  • M7A3 (Spec Example 9.3. Bare Documents)
  • WZ62 (Spec Example 7.2. Empty Content)
  • 52DL (Explicit Non-Specific Tag [1.3])
  • S4JQ (Spec Example 6.28. Non-Specific Tags)
  • 8MK2 (Explicit Non-Specific Tag)
  • R4YG (Spec Example 8.2. Block Indentation Indicator)
  • 6BCT (Spec Example 6.3. Separation Spaces)
  • A2M4 (Spec Example 6.2. Indentation Indicators)
  • Q5MG (Tab at beginning of line followed by a flow mapping)
  • S7BG (Colon followed by comma)
  • DK3J (Zero indented block scalar with line that looks like a comment)
  • FP8R (Zero indented block scalar)
  • 4MUZ (Flow mapping colon on line after key)
  • NJ66 (Multiline plain flow mapping key)
  • UT92 (Spec Example 9.4. Explicit Documents)
  • 9SA2 (Multiline double quoted flow mapping key)
  • K3WX (Colon and adjacent value after comment on next line)
  • 5MUD (Colon and adjacent value on next line)

Also adds the license file to nupkg to fix NU5125 warning.

YamlDotNet - Add tests from the official test suite

Published by aaubry about 5 years ago

Release 6.1.1

New features

Tests from yaml-test-suite have been added to the project and an effort has been made to improve the conformance, thanks to @am11:

  • #395 Add spec test executor for yaml-test-suite
  • #400 Improve YAML spec conformance by three tests
  • #401 Allow scalar to have value without space (x:y)
  • #403 Relax anchor names allowed characters set
  • #404 Constrain DocumentEnd parsing to allowed tokens
  • #406 Improve omitted keys handling

Other changes:

  • Allow to save a YamlStream to an IEmitter
  • Some infrastructural changes have been made to ensure that the project would build on Linux without issues.

Bug fixes

  • #396 Fix missing string quotes around json serialized enums (fixes #146)
  • Increase the max simple key length to 1024 and allow to configure it
  • Never emit key indicators in JSON
YamlDotNet - Merge YamlDotNet.Signed and YamlDotNet packages

Published by aaubry over 5 years ago

This release merges the YamlDotNet.Signed and YamlDotNet packages, as discussed in #390.
This change has the following consequences:

  • The assemblies in the YamlDotNet package will now have strong names.
    This is a breaking change. If you depend on a library that depends on a
    previous version of YamlDotNet, you will first need to update that library.

  • The YamlDotNet.Signed package will cease to be published.
    The code should be updated to depend on YamlDotNet.

YamlDotNet - Enable serialization of public fields

Published by aaubry over 5 years ago

YamlDotNet will now also serialize public fields. This feature is enabled by default, but it can be disabled by calling IgnoreFields() on the SerializerBuilder or DeserializerBuilder.

YamlDotNet - More detailed exception

Published by aaubry over 5 years ago

New features:

  • Produce a detailed error message when too much recursion is detected during serialization.
YamlDotNet - Make configuration more flexible

Published by aaubry over 5 years ago

New features:

  • Add support for supplying custom IObjectGraphTraversalStrategy implementations.
  • Add abstract WithTagMapping() method to the base serializer / deserializer builder.

Bug fixes:

  • Use BenchmarkDotNet and Compile YamlDotNet with Optimize option in Release-* configurations
YamlDotNet - Bug fixes

Published by aaubry about 6 years ago

  • Fix roundtripping of tags on sequences (#347)
YamlDotNet -

Published by aaubry about 6 years ago

Improvements:

YamlDotNet -

Published by aaubry about 6 years ago

Improvements:

  • Add interfaces for serializer and deserializer (fixes #350).

Fixes:

  • Fixed issue #348 that caused the assembly to have version 0.0.0.0.
YamlDotNet - Metadata update

Published by aaubry over 6 years ago

This release adds the repository location to the package metadata. No functional changes were made.