xml2json in Ruby

I am so addict to json recently and can not stand for passing xml around services, time to switch from xml to json in my Ruby code, google told me this post is the best.

As simple as:

puts Hash.from_xml(response).to_json

Chances are you might have mixed version of activesupport installed on your server and dev machine. I decided to remove the higher version from my dev machine, but RubyMine doesn’t support GUI mode gem uninstall. What a shock!

Had to back to my old buddy NetBeans to do the GUI gem uninstall.

Got this free RubyMine license during some promotion last month. Loving it and badly need some improvments:

  1. spec template is not nice as the one in NetBeans, maybe I can customize it. Not a big deal.
  2. gem management is a joke. NetBeans is way more professional, while recently NetBeans kept getting no-response error.
  3. load path management is not eady to find. Also, will use to it someday.

Killing features:

  1. Be able to run selected spec/story, never found this feature in NetBeans.
  2. Same shortcut series from intelliJ. Reuse your ReSharper memories.
  3. Output panel charset default o UTF8, Woohoo! Have Being looking for this for years! Also this can switch to many other charsets.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s