Methods
Public Class methods
new()
    # File lib/raw/dispatcher/format/json.rb, line 9
 9:   def initialize
10:     @name = "json"
11:     @content_type = "application/json"
12:     @extension = "json"
13:     @template_extension = "jsonx"
14:   end
Public Instance methods
after_action(controller, context)
    # File lib/raw/dispatcher/format/json.rb, line 16
16:   def after_action(controller, context)
17:     if controller.out.blank?
18:       if model = controller.class.ann(:self, :model)
19:         resource = model.to_s.demodulize.underscore
20:         if collection = controller.instance_variable_get("@#{resource.plural}")
21:           controller.send(:print, collection.to_json)
22:         elsif resource = controller.instance_variable_get("@#{resource}") 
23:           controller.send(:print, resource.to_json)
24:         end
25:       end
26:     end
27:   end