REST serialize