when serializing these things it's generally going to be best to put the tag first though. That way it's cheap to figure out how to parse it.
Unless, you do de-serialization and serialization in tight-loop I guess is it acceptable.
NOTE: A bigger problem is when you need to decide at runtime which one of the kind you have been handled.