Module: Console::Output::JSON

Defined in:
lib/console/output/json.rb

Class Method Summary collapse

Class Method Details

.new(output, **options) ⇒ Object



12
13
14
15
16
17
# File 'lib/console/output/json.rb', line 12

def self.new(output, **options)
  # The output encoder can prevent encoding issues (e.g. invalid UTF-8):
  Output::Encoder.new(
    Serialized::Logger.new(output, format: ::JSON, **options)
  )
end