owensd/json-swift — pull request #9 by Anton3 (2014-08-02 10:28:32+00:00)
Title: Add some new features and lots of refactor

This adds some features essential for a JSON library, like `NSData` conversion. Some changes are quite radical, so any sensible discussion is welcomed.

1. Convert `_Invalid` to `JSONError(error: NSError)`. `JSONNull` is now used only when we need to represent a presence of JSON's "null" value.
2. Add descriptive error messages. Zero tolerance to "silent falls" or inappropriate `JSONNull`!
3. Refactor `stringify()` and `description`.
4. Make `JSONValue` a `LogicValue`. An instance is "true" <=> it contains a meaningful value, i.e. no errors.
4. Swap `JSON` and `JSONValue`. `JSON` is now an alias.
5. Remove global `JSONNull` constant. Its role has significantly decreased anyway. When it's needed, `.JSONNull` works flawlessly.
6. Allow creation of JSONValue from NSData. It is essential for networking.
7. Other minor refactors.