profile
viewpoint

rails/jbuilder 3810

Jbuilder: generate JSON objects with a Builder-style DSL

esamattis/underscore.string 3339

String manipulation helpers for javascript

kossnocorp/role 144

jQuery plugin to provide easy way to handle DOM elements by role attribute

rwz/adequate_exposure 71

Exposing things, adequately

rwz/cant-parse-emails 37

A list of webservices that have no idea how an email address should look like

rwz/base64.coffee 13

Base64 implementation with support for unicode strings

rwz/counterfeit 8

Money management in Rails 3.

issue commentintridea/multi_json

Where do security issues belong?

Hi,

MultiJSON is not being actively maintained, but if the issue is something that can be addressed relatively easily, I'll be happy to take a look.

Feel free to send the details to pavel@pravosud.com

xxx

comment created time in 14 days

issue closedintridea/multi_json

Support for Simdjson

Hi, Is it possible to add support for simdjson gem?

closed time in 2 months

danilobarion1986

issue commentintridea/multi_json

Support for Simdjson

TLDR: It's possible, but I don't think it's going to happen.

This gem is in maintenance mode and no new features and versions are being developed at the moment. One of the goals is to keep this gem backwards compatible with older versions of Ruby (until 1.8) to support legacy codebases depending on it. I personally do not recommend using this gem in newer projects.

Also, MultiJSON's interface is intended to provide convenience over performance, and simdjson seems to be very performance oriented. If performance is what you're after, you have another reason to not use MultiJSON and do a more custom integration instead.

Furthermore, it doesn't seem like the suggested gem is mature and established enough to justify building an adapter. Pre 1.0 versions tend to change their public APIs quite often and introduce a lot of maintenance burden.

You're certainly welcome to fork MultiJSON and build your own adapter and use the fork, but (again), if you want performance, I recommend not using MultiJSON.

danilobarion1986

comment created time in 2 months

CommitCommentEvent

created tagintridea/multi_json

tagv1.15.0

A generic swappable back-end for JSON handling.

created time in 2 months

push eventintridea/multi_json

Pavel Pravosud

commit sha 9cc87105d12f72c85d618ca65a214fc49d027462

Fix changelog

view details

push time in 2 months

pull request commentintridea/multi_json

Fix detection for the json_gem adapter

Thanks. The fix is released as version 0.15.0

eregon

comment created time in 2 months

issue closedintridea/multi_json

Decode function not working as expected

MultiJson.decode behaves abnormally while dealing with certain characters: Example: MultiJson.decode("What’s") #=> "Whatâ\u0080\u0099s"

While JSON.parse works just fine: JSON.parse("{\"id\" : \"What’s\"}") #=> {"id"=>"What’s"}

Same behaviour on both 1.13.1 and 1.12.1 with :gson adapter

closed time in 2 months

abhijitkatiyar

push eventintridea/multi_json

Pavel Pravosud

commit sha 530a9813e32ca1fc08bc294fa1178796c3d1861a

Version 0.15.0

view details

push time in 2 months

push eventintridea/multi_json

Pavel Pravosud

commit sha 858b3e35b2e41b6a45c684bcd524a624da5f3efd

Add 2.7 to a list of "supported" ruby versions [skip travis]

view details

push time in 2 months

push eventintridea/multi_json

Pavel Pravosud

commit sha b79434a4c9daef4c504ca109afd6ab02dfc417d1

Revert "Update multi_json.gemspec" This reverts commit 66864817eb2fae85e9a93d8823877d75851ad666.

view details

push time in 2 months

CommitCommentEvent

push eventintridea/multi_json

Benoit Daloze

commit sha 401362d00fa707eefea1e290d7b15221f3525afc

Fix detection for the json_gem adapter * JSON::JSON_LOADED is also set by json/pure and so it is not enough to detect if the JSON native extension is loaded. * JSON::Ext is not enough either, because json_pure includes json/ext.rb. * JSON::Ext::Parser is only defined if the native extension is loaded so that is reliable. * Fixes https://github.com/intridea/multi_json/issues/196 * See that issue for details.

view details

Pavel Pravosud

commit sha 62d54019b17ebf83b28c8deb871a02a122e7d9cf

Merge pull request #197 from eregon/fix-detection-json-gem Fix detection for the json_gem adapter

view details

push time in 2 months

PR merged intridea/multi_json

Fix detection for the json_gem adapter
  • JSON::JSON_LOADED is also set by json/pure and so it is not enough to detect if the JSON native extension is loaded.
  • JSON::Ext is not enough either, because json_pure includes json/ext.rb.
  • JSON::Ext::Parser is only defined if the native extension is loaded so that is reliable.
  • Fixes https://github.com/intridea/multi_json/issues/196
  • See that issue for details.

The spec fails before the fix, and passes after the fix.

+19 -1

4 comments

2 changed files

eregon

pr closed time in 2 months

issue closedintridea/multi_json

MultiJSON assumes that the JSON ext is loaded if defined?(::JSON::JSON_LOADED)

See https://github.com/intridea/multi_json/blob/66864817eb2fae85e9a93d8823877d75851ad666/lib/multi_json.rb#L50

But that is unfortunately incorrect, because JSON pure also defines that constant: https://github.com/flori/json/blob/b20cdca8eb03297132bcf3b786eba602fa04ca37/lib/json/pure.rb#L14

I think using defined?(::JSON::Ext) would work better instead.

This causes an issue on TruffleRuby where JSON pure is used by default (and require 'json/ext' raises unless the json gem is installed additionally). If json is required before multi_json, then multi_json raises an error: https://github.com/oracle/truffleruby/issues/2032#issuecomment-641884150

On MRI it's quite confusing as it will detect JSON pure as :json_gem (same issue), but still work because it will then require 'json/ext' which will work (but have 2 versions of JSON loaded, so it seems suboptimal).

closed time in 2 months

eregon

pull request commentintridea/multi_json

Add Ruby 2.7 to test matrix

Thanks

bastelfreak

comment created time in 2 months

push eventintridea/multi_json

Tim Meusel

commit sha 4d868c1f6cbf1c92495efe4f45c9839e2901f1ca

Add Ruby 2.7 to test matrix

view details

Pavel Pravosud

commit sha db64069a61bba845599ed93c1766d4681bf3c0c1

Merge pull request #194 from bastelfreak/ruby27 Add Ruby 2.7 to test matrix

view details

push time in 2 months

PR merged intridea/multi_json

Add Ruby 2.7 to test matrix
+4 -1

0 comment

1 changed file

bastelfreak

pr closed time in 2 months

pull request commentintridea/multi_json

Fix detection for the json_gem adapter

This looks good. I'd probably have some time to look into merging and fixing the CI later this week. I'll take care of the changelog.

eregon

comment created time in 3 months

more