title: Set default value for Postgres JSON column in Rails < 4
body: <p>So I'm starting to use the Postgres JSON datatype, now that <a href="http://www.postgresql.org/docs/9.3/static/functions-json.html">there's a lot of fun stuff you can do with it</a>.
  In one of my Rails apps which is not yet Rails 4 (where <a href="https://speakerdeck.com/mattt/postgres-and-rails-4-nosql-in-your-sql-database">support for Postgres JSON has been added</a>) I added a JSON column like this:</p>
  
  <pre><code>create_table :foo do |t|
    t.column :bar, :json
  end
  </code></pre>
  
  <p>but I can't figure out how to set a default value for the column.
  I tried all variations like <code>{}</code>, <code>'{}'</code>, <code>'{}'::json</code>, <code>'[]'::json</code> etc. but I either get an error when the migration runs or it simply doesn't work, meaning the migration runs but, when I create a new <code>Foo</code>, <code>bar</code> is <code>nil</code>.</p>