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

[feature:lib] Add serialization support #63

Merged
merged 7 commits into from
May 3, 2019
Merged

[feature:lib] Add serialization support #63

merged 7 commits into from
May 3, 2019

Conversation

eonu
Copy link
Owner

@eonu eonu commented May 3, 2019

  • Adds serialization support through the following methods:
    • to_h: Serialize into a Ruby hash (with symbol keys). Accepts a boolean argument, representing whether or not to deep-serialize nested Author and Category objects (defaults to false).
    • as_json: Serialize into a Ruby hash which is also a valid JSON hash.
    • to_json: Serialize into a valid JSON string.
  • Adds ATTRIBUTES constant for Paper, Author and Category entities, as a list of which attributes are available for the entity.

@eonu eonu merged commit 5b8502a into master May 3, 2019
@eonu eonu deleted the feature/to_h branch May 3, 2019 02:47
@eonu eonu mentioned this pull request May 3, 2019
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.

1 participant