Support JSON serialization of ActiveRecord attributes