added RenderTo method to make it easier to write json directly to a io.Writer