Editor serialize and deserialize code