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

Data Transformers #21

Open
MaximKeegan opened this issue Jan 18, 2015 · 1 comment
Open

Data Transformers #21

MaximKeegan opened this issue Jan 18, 2015 · 1 comment

Comments

@MaximKeegan
Copy link

It's possible to set API field transformers? For eg i know that in my api all fields named createdAt need to be transformed to NSDate. It's possible to do that?

@priteshshah1983
Copy link

A quick and dirty approach is to change the generated property type to NSDate * instead of NSString * and see if it works. This should work if your date format is ISO 8601: http://en.wikipedia.org/wiki/ISO_8601

This approach is not ideal though as you would be changing the generated source code. These would be overwritten the next time you generate the code. I will have to think about this more, but hopefully this gets you going for the time being.

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

No branches or pull requests

2 participants