# File lib/json/jose.rb, line 59 def decode(input, key_or_secret = nil, algorithms = nil, encryption_methods = nil) if input.is_a? Hash decode_json_serialized input, key_or_secret, algorithms, encryption_methods else decode_compact_serialized input, key_or_secret, algorithms, encryption_methods end rescue JSON::ParserError, ArgumentError raise JWT::InvalidFormat.new("Invalid JSON Format") end