Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ObjectMapper dependency #179

Merged
merged 2 commits into from
Sep 14, 2017
Merged

Remove ObjectMapper dependency #179

merged 2 commits into from
Sep 14, 2017

Conversation

edjiang
Copy link
Contributor

@edjiang edjiang commented Aug 31, 2017

One of the benefits of Swift 4 is that it defines a new set of object serialization/deserialization APIs. Since the SDK currently depends on ObjectMapper, a 3rd party library, for its JSON handling, I thought it'd be a good idea to move off ObjectMapper to the Codable APIs.

Also, the models were all previously optionals. This makes the SDK harder to use, so I went through the models and added the correct nullability according to documentation and test responses we have.

Note: For primitive types, we do not make them optional. This is because Objective-C will not import optional primitives, and these properties will be inaccessible.

As an alternative, we could use the correct nullability for primitives and attempt to use this workaround to expose objective-c only properties. See Stack Overflow post

See:

@edjiang edjiang requested a review from bobz August 31, 2017 22:06
@edjiang edjiang mentioned this pull request Sep 1, 2017
7 tasks
@edjiang edjiang force-pushed the swift-4-migration-pt-1 branch from b9931d0 to 1027692 Compare September 13, 2017 19:06
@edjiang edjiang force-pushed the swift-4-migration-pt-2 branch from 095abb2 to b5b326f Compare September 13, 2017 23:04
@edjiang edjiang changed the base branch from swift-4-migration-pt-1 to develop September 13, 2017 23:04
@edjiang edjiang merged commit a6d2f71 into develop Sep 14, 2017
@edjiang edjiang deleted the swift-4-migration-pt-2 branch September 15, 2017 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants