Serialization code into Border classs.