All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- Changed how Date, Time, NaiveDateTime, and DateTime are encode when nested in a map, fixes #207
- fixed typo in spec:
idnent_level
=>indent_level
- quote strings strings starting with % #184
- handle quoted strings containing single quotes (should always use double quotes) #179, #181
- handle string with leading or trailing whitespaces #180, #181
- Support for escape and unicode characters #98
- Refactor
Ymlr.Encode
to make it faster #171. - Handle special floats
.Inf
and.Nan
. #170, #172 - Script for benchmarking
Although this release contains only fixes but as the encoding changes, we consider it a breaking change. Hence the major bump.
- Adds an option
sort_maps
to encode map with entries sorted - #139,#144 - Quote values beginning with
:{
- #140,#141
Ymlr.Encoder
- Optionexcept: :defaults
to exclude default values
Up to and including version 3.x, ymlr
would encode structs out of the box.
This version introduces protocols so and structs need to @derive Ymlr.Encoder
in order to be encoded. See the documentation of the Ymlr.Encoder
protocol
for further information.
- A protocol based implementation was added which give more freedom to users of this library - #118
- Adds an option
atoms
to encode atom map keys with a leading colon. - Tuples are now encoded as lists.
- Wrap map keys in doouble quotes when required (#94, #95)
- Encode structs by turning them to lists before mapping over them
In this release we changed the way DateTime
is encoded (see below). This can be a breaking change if you rely on the old date format with spaces. Because of this change, version 3.0.0 is now again compatible with Elixir 1.10
- use
Enum.map_join/3
indead ofEnum.map/2
andEnum.join/2
as it's more efficient according to credo recommendations - Change the serialization of timestamps to use the canonical (iso8601) format, i.e. before:
2022-07-31 14:48:48.000000000 Z
and now:"2022-07-31T14:48:48Z"
(#87, #90)
- 2.0 and upwards don't support Elixir 1.10 anymore. Use version 1.x for Elixir 1.10 support.
- Date and DateTime support (#17)
- yaml_elixir upgraded to 2.6.0
- excoveralls upgraded to 0.14.0
- ex_doc upgraded to 0.24.1
- credo upgraded to 1.5.5
- dialyxir upgraded to 1.1.0
- Date and DateTime support (#17)
- yaml_elixir upgraded to 2.6.0
- excoveralls upgraded to 0.14.0
- ex_doc upgraded to 0.24.1
- credo upgraded to 1.5.5
- dialyxir upgraded to 1.1.0
- Rescue ArgumentError exception for oversize floats according to Float.parse/1 doc
No changes in this release. We have tested the library on a big bunch of CRDs and feel confident to publish a sable relese.
First ymlr beta release