Preparation for json serialization