toJSON and render