Skip to content

Empty element refinement and Linux encoding fix

Compare
Choose a tag to compare
@tachyonics tachyonics released this 20 Aug 23:23
· 10 commits to master since this release
65d576b

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.