You can make some decisions about de/serialization directly on your class and structs:
Types you might get from deserialization or find useful for serializing back to the PHP format.