Skip to content

Conversation

alsemyonov
Copy link

It makes it possible to use JSONAPI gem inside RubyMotion projects without having a lot of warnings on every run.

It makes it possible to use JSONAPI gem inside RubyMotion projects without lot of warnings.
@alsemyonov alsemyonov changed the title Do not rely on JSON gem. Do not rely on JSON gem Aug 26, 2016
@beauby
Copy link
Owner

beauby commented Sep 18, 2016

It makes sense to remove the JSON dependency, as it is there only for convenience, and causes issue with versioning (c.f. #34). In order to merge this, I would need appropriate modifications done there as well (basically removing the call to JSON.parse).

@beauby
Copy link
Owner

beauby commented Sep 18, 2016

Fixes #28.

This was referenced Sep 18, 2016
Copy link
Owner

@beauby beauby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just get rid of the call to JSON.parse in jsonapi/parse.rb.

@alsemyonov
Copy link
Author

alsemyonov commented Sep 20, 2016

I consider that we should rather get back require 'json' for backward compatibility since JSON is in Ruby stdlib since earlier 2.*.*s or 1.9.*s, I believe. We just should not enforce users of the jsonapi gem to install or update json instead of using system one or specifically needed by other obstacles only because of they want to use JSON API parser gem.

Another way is to raise ArgumentError if we get any data except Hash to enforce JSONAPI gem users to parse JSON by themselves and give it to (sic!) JSONAPI.parse method? Why should they parse JSON before parsing JSONAPI?

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