Sha256: 6c1828851f512ab2fad26fa767a34daf09857c2716f4a8f58a254b0efed22de7
Contents?: true
Size: 371 Bytes
Versions: 10
Compression:
Stored size: 371 Bytes
Contents
module Dox module Formatters class Json < Dox::Formatters::Base def format # in cases where the body isn't valid JSON # and the headers specify the Content-Type is application/json # an error should be raised return '' if body.nil? || body.length < 2 JSON.pretty_generate(JSON.parse(body)) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems