use compactRender in Serialization.write