Option to serialize graph