[MacRuby-devel] [MacRuby] #257: Conversion to JSON works , But JSON parsing fails in MacRuby 0.4

MacRuby ruby-noreply at macosforge.org
Sun May 24 16:04:09 PDT 2009


#257: Conversion to JSON works , But JSON parsing fails in MacRuby 0.4
---------------------------+------------------------------------------------
 Reporter:  nexneo@…       |       Owner:  lsansonetti@…        
     Type:  defect         |      Status:  new                  
 Priority:  blocker        |   Milestone:                       
Component:  MacRuby        |    Keywords:  json                 
---------------------------+------------------------------------------------

Comment(by dj2@…):

 The attached patch (json.diff) fixes json parsing for me.  The portions
 wrapped in if objc could be extracted into a method but I wasn't sure how
 close we were trying to keep the code to the original ruby?

 {{{
 titania:trunk dj2$ macirb
 >> a = {:foo => 1, :bar => 2}
 => {:foo=>1, :bar=>2}
 >> require 'json'
 => true
 >> JSON.parse(a.to_json)
 => {"foo"=>1, "bar"=>2}
 >> quit
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/257#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list