MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

[myspace-ruby] why json/pure instead of json?

Last post 07-07-2008 9:17 PM by Warren. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-07-2008 2:08 PM

    • Warren
    • Not Ranked
    • Joined on 02-04-2008
    • Posts 2

    [myspace-ruby] why json/pure instead of json?

    Hopefully this will work its way through the correct channels to a MySpace developer who can address this question...

    Why does myspace-ruby-0.7.1 require "json/pure" instead of just "json"?

    The docs say: You can install json via rubygem, which should provide a native C 'ext' and pure ruby 'pure' extension. The native 'json/ext' module is faster, but could lead to some compatibility issues, so we stuck with the pure variant.

    Can you elaborate on "compatibility issues"? Is this a mswin32 bug only (and if we're operating in a *NIX environment, we can safely use the C extension "json")? Are there specific edge cases you can highlight?
  • 07-07-2008 3:19 PM In reply to

    • Chris
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 2
    • MDP Team

    Re: [myspace-ruby] why json/pure instead of json?

     Yes, this is a win32 specific bug we hit on a couple occasions, which was related to a couple installs that had built win32 ruby from source.   We should probably just switch back to native json/ext or check the installed json libs on install to see what to do.  I'll add it to the TODO.

     And yes, if you're non-win32, you can just use native json.

     

     

     

     

  • 07-07-2008 9:17 PM In reply to

    • Warren
    • Not Ranked
    • Joined on 02-04-2008
    • Posts 2

    Re: [myspace-ruby] why json/pure instead of json?

    Awesome! Thanks for the quick response.
Page 1 of 1 (3 items)