Skip to content

v0.3.0

Choose a tag to compare

@Azeem-Haider Azeem-Haider released this 09 Nov 14:03
4257e95

Breaking

  • YAML.decode/2 returns a single document directly instead of a one-element list,
    and nil for empty input. Change {:ok, [doc]} = YAML.decode(...) to
    {:ok, doc} = YAML.decode(...).

Added

  • YAML.encode/2 and YAML.encode!/2, for Elixir data, a YAML.AST.Document or a list of them (#18).
  • YAML.encode_to_iodata/2 and YAML.encode_to_iodata!/2 (#18).
  • YAML.encode_stream/2 and YAML.encode_stream!/2 (#19).
  • YAML.decode_stream/2 and YAML.decode_stream!/2 (#19).
  • :sort_maps encode option to write map keys in sorted order (#18).
  • YAML.EncodeError, with :type and the :location of the value that failed (#9).

Fixed

  • return: :first_document returns nil for empty input instead of crashing.
  • Non-tuple yamerl_opts return an error instead of crashing.
  • Unknown option errors name the option.
  • Hex package and documentation links point to the right GitHub repository.
  • Input that crashes yamerl's parser returns an error instead of raising.

Full changelog: v0.2.0...v0.3.0