# File lib/jwt/json.rb, line 6defdecode_json(encoded)
JSON.parse(encoded)
rescueJSON::ParserErrorraiseJWT::DecodeError.new("Invalid segment encoding")
end
encode_json(raw)click to toggle source
# File lib/jwt/json.rb, line 12defencode_json(raw)
JSON.generate(raw)
end