It\'s a pain to write codes like this all the time in jbuilder.json template:
json.extract! notification, :id, :user_id, :notice_type, :message, :resource_ty
Maybe you can use json.merge!.
json.merge!
json.merge! notification.attributes
https://github.com/rails/jbuilder/blob/master/lib/jbuilder.rb#L277