Refactored the deserialize method of the native json serializer