JSON_PURE with the new Joni regex fails with array in a Hash, I guess
---------------------------------------------------------------------
Key: JRUBY-1636
URL: http://jira.codehaus.org/browse/JRUBY-1636
Project: JRuby
Issue Type: Bug
Components: Extensions
Environment: Linux Ubuntu, Java 1.6
Reporter: Joao Pedrosa
Fix For: JRuby 1.1
Here's the symptom:
[EMAIL PROTECTED]:~/loose/t_/jruby$ /opt/jruby-1.1/bin/jruby -v re.rb
ruby 1.8.5 (2007-11-29 rev 4842) [i386-jruby1.1b1]
{"numbers":[5,9]}
/opt/jruby-1.1/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/parser.rb:196:in
`parse_array': expected ',' or ']' in array at ']}'! (JSON::ParserError)
from
/opt/jruby-1.1/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/parser.rb:161:in
`parse_value'
from
/opt/jruby-1.1/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/parser.rb:225:in
`parse_object'
from
/opt/jruby-1.1/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/pure/parser.rb:91:in
`parse'
from
/opt/jruby-1.1/lib/ruby/gems/1.8/gems/json_pure-1.1.2/lib/json/common.rb:122:in
`parse'
from re.rb:7:in `parse'
[EMAIL PROTECTED]:~/loose/t_/jruby$ /opt/ruby-1.8.6/bin/ruby -v re.rb
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-linux]
{"numbers":[5,9]}
{"numbers"=>[5, 9]}
[EMAIL PROTECTED]:~/loose/t_/jruby$ cat re.rb
require 'rubygems'
gem 'json_pure'
require 'json'
h = {'numbers' => [5, 9]}
s = h.to_json
puts s
h = JSON.parse(s)
p h
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email