class Sparrow::Strategies::DefaultJsonFormatStrategy

NullObject JSON Format Strategy Does no direct conversion except casting the given object to a string

Public Instance Methods

convert(input) click to toggle source

@param [#to_s] input the JSON object @return [String] the input as a String

# File lib/sparrow/strategies/json_format_strategies/default_json_format_strategy.rb, line 21
def convert(input)
  input.to_s
end
match?(_input) click to toggle source

Matches always since this is the NullObjectStrategy and thus the fallback. @param [Object] input the JSON input @return [Boolean] True

# File lib/sparrow/strategies/json_format_strategies/default_json_format_strategy.rb, line 14
def match?(_input)
  true
end