src/vs/workbench/services/extensions/common/rpcProtocol.ts/parseJsonAndRestoreBufferRefs
export function parseJsonAndRestoreBufferRefs(jsonString: string, buffers: readonly VSBuffer[], uriTransformer: IURITransformer | null): any {
	return JSON.parse(jsonString, (_key, value) => {
		if (value) {
			const ref = value[refSymbolName];
			if (typeof ref === 'number') {
				return buffers[ref];
			}

			if (uriTransformer && (<MarshalledObject>value).$mid === MarshalledId.Uri) {
				return uriTransformer.transformIncoming(value);
			}
		}
		return value;
	});
}