private static void serialize(GroupingRequest request, StringBuilder out) {
        Iterator<Continuation> it = request.continuations().iterator();
        if (it.hasNext()) {
            out.append("{ continuations:[");
            while (it.hasNext()) {
                out.append('\'').append(it.next()).append('\'');
                if (it.hasNext()) {
                    out.append(", ");
                }
            }
            out.append("] }");
        }
        out.append(request.getRootOperation());
    }
Do YQL+ escaping, which is basically the same as for JSON, of the
incoming string to the "quoted" buffer. The buffer returned is the same
as the one given in the "quoted" parameter.

@param in a string to escape
@param escaped the target buffer for escaped data
@return the same buffer as given in the "quoted" parameter
container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java