a13ccfd0f5
Generated by https://github.com/jsoref/spelling `f`; to maintain your repo, please consider `fchurn` I generally try to ignore upstream bits. I've accidentally included some items from the `deps/` directory. I expect someone will give me a list of items to drop, I'm happy to drop whole files/directories, or to split the PR into multiple items (E.g. comments/locals/public). Closes #4294
19 lines
611 B
C++
19 lines
611 B
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#include "pch.h"
|
|
#include "Utils.h"
|
|
|
|
// Method Description:
|
|
// - Constructs a wstring from a given Json::Value object. Reads the object as
|
|
// a std::string using asString, then builds an hstring from that std::string,
|
|
// then converts that hstring into a std::wstring.
|
|
// Arguments:
|
|
// - json: the Json::Value to parse as a string
|
|
// Return Value:
|
|
// - the wstring equivalent of the value in json
|
|
std::wstring GetWstringFromJson(const Json::Value& json)
|
|
{
|
|
return winrt::to_hstring(json.asString()).c_str();
|
|
}
|