ruby-rdf/json-ld

Could a soft dependency on multi_json abstraction be used

abargnesi opened this issue · 1 comments

I see the ruby JSON implementation is used to read the input.

Would it be desired to provide a soft dependency (i.e. not declared in gemspec) on the multi_json gem? This would allow users to supply a more efficient JSON parser for their ruby engine. On MRI that is likely Oj, on JRuby that is likely jrjackson.

The required work is pretty minimal:

  • Test for multi_json dependency on LOAD_PATH.
  • If present, parse JSON-LD with MultiJson.load.
  • If not, fall back to JSON module.

Good idea; this has been suggested before.