Decodes the wire representation into the entity based on the data format.
the decoded entity.
the wire representation to decode.
the desired result type.