-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Mapping NSDecimalNumber #145
Comments
ObjectMapper doesn't support NSDecimalNumber. We are avoiding Objective-C types when possible. If you need a NSDecimalNumber, you can consider using a CustomTransform to support it. |
NSDecimalNumber must be taken in consideration. There is no replacement for this type in Swift. This is the only type that can be used to represent money. Double or float is not an alternative. |
@jonasman While I agree with you, there is an included NSDecimalNumberTransform in ObjectMapper, so this is a minor inconvenience. |
That sounds good then. |
My approach fails.
n
is set tonil
, whereas it is set correctly if its type isDouble?
. Is there a correct way to do this?The text was updated successfully, but these errors were encountered: