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

Use OJ for JSON serialization #259

Merged
merged 2 commits into from
Dec 21, 2015
Merged

Use OJ for JSON serialization #259

merged 2 commits into from
Dec 21, 2015

Conversation

drewda
Copy link
Member

@drewda drewda commented Dec 21, 2015

The OJ gem ("Optimized Json") is faster than Ruby's built-in JSON serializer. I thought by including the gem it would be automatically used by ActiveModelSerializers. Apparently not.

Including oj_mimic_json now makes sure to use OJ for JSON serialization. Should lead to some slight performance improvements when rendering a bunch of JSON on API endpoints.

@drewda drewda self-assigned this Dec 21, 2015
drewda added a commit that referenced this pull request Dec 21, 2015
@drewda drewda merged commit c381f01 into master Dec 21, 2015
@drewda drewda deleted the use-oj-for-json branch December 21, 2015 23: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.

None yet

1 participant