lib/lhc/formats/json.rb in lhc-9.4.2 vs lib/lhc/formats/json.rb in lhc-9.4.3
- old
+ new
@@ -17,10 +17,14 @@
def as_open_struct(input)
parse(input, OpenStruct)
end
def to_body(input)
- input.to_json
+ if input.is_a?(String)
+ input
+ else
+ input.to_json
+ end
end
def to_s
'json'
end