Method: Steno::JsonPrettifier#prettify_line

Defined in:
lib/steno/json_prettifier.rb

#prettify_line(line) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/steno/json_prettifier.rb', line 32

def prettify_line(line)
  begin
    json_record = Yajl::Parser.parse(line)
  rescue Yajl::ParseError => e
    raise ParseError, e.to_s
  end

  format_record(json_record)
end