Releases: LiveUI/XMLCoding
Support compilation under Swift 5.1, remove warnings under 5.x
- Removed unnecessary duplicate XMLHeader.init
- Fix Swift 5 Build Warnings
- Support compilation under Swift 5.1.
Added strategies for decoding and encoding maps.
Add the ability to collapse and expand an XML structure that has explicit Key and Value tags-
<Result>
<Tag>
<Key>QueueType</Key>
<Value>Production</Value>
</Tag>
<Tag>
<Key>Owner</Key>
<Value>Developer123</Value>
</Tag>
</Result>
Decoded into or encoding from a structure like-
struct Result {
let tags: [String: String]
}
Can also be combined with the collapsing/expanding ListDecodingStrategy where there is an outer element for the list of entries.
Empty element refinement and Linux encoding fix
Added some refinement around how empty XML elements are handled, specifically a empty string ("") and empty Data will be seen as empty elements. These changes will cause the decoder to
- effectively ignore empty tags for optional parameters
- interpret an empty tag for a required String parameter as an empty string
- interpret an empty tag for a required Data parameter as an empty Data instance
- fail on any other empty tags for required elements
Moved the encoder to native Swift Types from NS* to be more typesafe and to avoid differences between platforms. This fixes encoding on Linux.
Fix to handle singleton lists with ListDecodingStrategy.
Fix to handle singleton lists with ListDecodingStrategy.collapseListUsingItemTag.
Add ListEncodingStrategy and ListDecodingStrategy
Provides an option to more compactly represent a list in a type hierarchy by collapsing a list with all items under a single tag when decoding and expanding all items to be under that tag when encoding. No change to default behavior.
Empty XML elements fix
Add a fix to handle empty XML elements that can be decoded into types with no required properties.
Compiles on Linux
0.1.1 coding works on linux now
First release
First release with little mods after forking