Class: KongSchema::Reporter::JSONPrettyPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/kong_schema/reporter.rb

Overview

Print objects as human-readable JSON

Class Method Summary collapse

Class Method Details



42
43
44
# File 'lib/kong_schema/reporter.rb', line 42

def self.print(object)
  JSON.pretty_generate(YAML.load(YAML.dump(object))) + "\n"
end