Use correct type object for serialize result.