If I understand correctly, you don't know in fact the exact type of canJump ?
Have a look here to use unknown type:
https://stackoverflow.com/questions/52896731/how-to-use-jsondecoder-to-decode-json-with-unknown-type
Topic:
Programming Languages
SubTopic:
Swift
Tags: