serializing at http level