serialize topology