Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
This is a source breaking change for clarity.
Common operations on subitems of ARRAYs and OBJECTs are now called Child operations.
Thus there are three different types of operations, best illustrated by the remove operation:
Common: removeChild, removeChildren:equalTo
I.e. the name now clarifies just how the operation should be regarded. Child operations are hierarchy operations that are (in theory) independent of the containers the subitems are in.
Als the operation index:ofChildrenEqualTo has been removed as it is too high level for a basic API. The source code (in Array.swift) is still present to aid clients in implementing this client side.
The ability to parse and codify top level items (including non-objects) has been expanded to include named items. Some related bugs were fixed.
Most notably this means that the parse functions now return an optional! This will break existing code. However fixing this should be easy.
- Added name to top level item (if the top level item has a name)
- Fixed error when reading top level string value
- Added reading of named top level values
- Added return of nil when parsing empty data or only whitespace data
- Updated several documentation texts
The previous bug -once fixed- unearthed another -even bigger- bug.
Its fixed now, but it will have effectively made releases 0.13.0 and 0.13.1 unusable.
So please make sure to upgrade to the latest. (0.13.2)
In the previous releases escape sequence support was mostly missing. This release adds full support for escape sequences. Names and String values can now contain escape sequences and these will be mapped to their proper characters when reading names and string values. When writing name and string values the necessary characters will be converted into escape sequences.
As a result it may be necessary to update code that uses the operations 'nameValue' and 'stringValue' if that code managed the translation from/to escape sequences on the API user side.
In addition the following changes were made since release 0.12.0:
- Added support function 'uniqueName'
- Made 'insert:child:at' available for OBJECTs as well.
- Added 'setValueFromAny' to support GUI updates to tables and outline views.
- Made the function 'location' public.
Escape sequences in detail:
- Added 'nameValueRaw' to access the single byte UTF8 name
- Added 'nameValuePrintable' to access a name in which escape sequences are replaced by printable characters.
- Added 'stringValueRaw' to access the single byte UTF8 string value
- Added 'stringValuePrintable' to access a name in which escape sequences are replaced by printable characters.
- Added 'stringToJsonString' and 'jsonStringToString' as extension operations to the Swift String type.
- Added 'JsonStringSequenceLUT' to control the mapping of string sequences to characters (and vice versa)