Base Serialization code for ListNode