Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

2.0 API #8

Open
5 tasks done
calebd opened this issue Nov 18, 2015 · 0 comments
Open
5 tasks done

2.0 API #8

calebd opened this issue Nov 18, 2015 · 0 comments

Comments

@calebd
Copy link
Contributor

calebd commented Nov 18, 2015

I'd like to clean up the API and release a 2.0.

  • Switch from things like string and bool properties that use common type names to stringValue and boolValue
  • Remove property getters for types that are not core JSON types
  • Switch to new DecoderType and deprecate JSONDecodable
  • Switch to new EncoderType and deprecate JSONEncodable
  • Add arrayValue and dictionaryValue properties that expose the raw object as [AnyObject]? and [String: AnyObject] respectively
calebd added a commit that referenced this issue Nov 19, 2015
calebd added a commit that referenced this issue Nov 19, 2015
calebd added a commit that referenced this issue Nov 19, 2015
`DecoderType` is a new protocol that better encapsulates the idea of decoding an object from a given `JSON`. It allows for two abilities that `JSONDecodable` did not:

1) Multiple decoders for the same type can be defined. This is illustrated by the two `NSDate` decoders provided by Alexander.
2) The decoder type is separate from the type being decoded.

`JSONDecodable` is now deprecated.
calebd added a commit that referenced this issue Nov 20, 2015
calebd added a commit that referenced this issue Nov 20, 2015
calebd added a commit that referenced this issue Nov 20, 2015
calebd added a commit that referenced this issue Nov 20, 2015
It acceps a `SequenceType` of `Value`. Though to be fair I'm not sure if this would be better as an extension to `SequenceType` instead.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant