use compactRender in Serialization.write
Merge pull request #1438 from stackmob/master

use compactRender in Serialization.write