private static ByteBuffer getByteBuffer(ConfigPayload payload) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            payload.serialize(baos, new JsonFormat(true));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return ByteBuffer.wrap(baos.toByteArray());
    }
Utilities for mangling config text, finding checksums, finding name and namespace in .def files etc.
config/src/main/java/com/yahoo/vespa/config/util/ConfigUtils.java