I don't think that we need to specially check for this (see https://github.com/schmittjoh/serializer/blob/master/src/JMS/Serializer/JsonDeserializationVisitor.php) which would also improve the readability of this method a lot.

Can you also add the case below as ``default`` to switch statement?