JSON.dump a HashWithIndifferentAccess #507

Closed
dwbutler opened this Issue Jan 22, 2013 · 6 comments

4 participants

@dwbutler

This might be an ActiveSupport / Rails specific issue, but I'm not sure.

In JRuby 1.7.2 (1.9 mode), Rails 3.2.11:

JSON.dump(HashWithIndifferentAccess.new)
#or
JSON.dump({}.with_indifferent_access)

Java::JavaLang::NullPointerException

In Ruby 1.9.3, Rails 3.2.11:

JSON.dump({}.with_indifferent_access)
 => "{}" 
@BanzaiMan
JRuby Team member

flori/json#155 is a new request that attempts to fix this problem.

@flori

This problem is now fixed in the current master, so you can check it out. It will be released soon.

@BanzaiMan
JRuby Team member

@flori Thanks!

@enebo
JRuby Team member

Sounds like 1.7.7 is out so this should be resolved now. Closing.

@enebo enebo closed this Feb 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment