Parsing and creating JSON packets
A quick braindump:


PacketDeserializer#deserialize  is overcommented. Most comments restate what the code says. Try commenting as little as possible, but as much as necessary.
PacketDeserializer could benefit from not hardcoding the mapping between the type strings and classes. Consider passing a Map&lt;String, Class&lt;? extends Data&gt;&gt; as constructor parameter and replacing typeToClass with a map.get
Lastly you should also avoid rawtypes. Class without generics specification is a rawtype.


Continuing that thought, you really want a different name than Foo for the "PacketHandler" you pass in to Packet#handle. You should consider going so far as to extract the responsibility of handling the package into a separate class. A Packet should not know how to handle itself. It's originally just a data-holder, nothing intelligent :)