Use XPC's data type instead of string to pass the LSP value from Clangd. This will make it easier to use from sourcekit-lsp (https://github.com/apple/sourcekit-lsp/pull/112), where I will be able to drop a conversion between Data and String.
I'd add a test with non-empty non-LSP dictionary to specifically test that we're ignoring the content. I like const-correctness but that's up to you. Otherwise LGTM.
We should also test something like
const char* key = "NotAnLSP"; const char* value = "Foo"; xpc_object_t EmptyDict = xpc_dictionary_create(&key, &value, 1);
Nit - const std::string?
Nit -const size_t and const char * const?