-
Notifications
You must be signed in to change notification settings - Fork 37
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
Remove multi_json dependency #6
Comments
I would be more inclined to replace the MultiJson dependency with a thin shim that provides the ability to use the fastest available JSON parsing engine, such as Oj. Is there a particular reason you would prefer to see it removed? |
No particular one. I am just bringing up the point as a lot of gems out there are removing the dependency. |
What you have described is MultiJson.
I was once a core maintainer of MultiJson. I now try to dissuade people from using it. MultiJson made sense at a time when JSON wasn’t part of the Ruby standard library. During this time (before MultiJson), every library that needed to parse JSON chose its own JSON parser (from MultiJson solved this problem by encouraging library maintainers to use MultiJson instead of a specific JSON parser, allowing the application developer to specify a single JSON parser that was right for their application/platform. If the application developer bundled multiple JSON parsers, MultiJson would choose the fastest one. If the application developer didn’t bundle any, MultiJson would fallback to When Ruby 1.9.2 was released in August 2010, the decision was made by the Ruby core team to bless the Since we are stuck with stdlib MultiJson served a purpose when there was no official JSON library. That time has long since passed. If stdlib |
I hope I didn’t leave you with the impression that I don’t support libraries like |
Most of these comments apply more to the aws/aws-sdk-ruby repositry, not as much to jmespath. I'm leaving them here, to keep them local to the discussion. The SDK does not expose the MultiJson interface to the user. This limits the surface area of what the shim would need to provide. Additionally, I am aware of a number of latency sensitive applications where time spent parsing JSON documents is very critical, such as with DynamoDB. Multiple customs rely on being able to load Oj at runtime. Parsing 1MB JSON documents with thousands of smaller objects has measurable difference. Given the small surface area required, I would like to explore removing the MultiJson dependency, while preserving the faster parsing options until at such time as Oj becomes standard. |
If you’re able to achieve this, I’d encourage you to contribute this code to MultiJson. |
Sorry for the slow response. I've been out of the office on travel. I'm back in town now. The I'll respond to the multi-parser issue in the other repo. Thanks for your patience. |
Closed by #7 |
A few other gems are removing multi_json dependency, as the default JSON gem has a good performance too.
Do you consider removing it as a dependency from this gem too?
Did you try it already? and it didnt perform well?
If the answer is Yes, I can send a PR. let me know.
The text was updated successfully, but these errors were encountered: