From your session, it seems that you are defining a protocol before declaring your Person class, which means that you already have another Person class in the scope. After defining the protocol, you then override the Person class, so the format cannot be found. So, to summarize, make sure you first declare your Person class, and then define your format.
EDIT : Updated Answer
source share