implement deserialization for Number and String.