JsonneD.makeString

Convert the given UTF8 string to a JsonnetJsonValue.

struct JsonneD
makeString
(
string v
)

Examples

string s = "Hello World";
JsonneD jd = JsonneD();
JsonnetValue sv = jd.makeString(s);
Nullable!string ss = sv.extractString();
assert(!ss.isNull());
assert(s == ss);
string s = "Hello World";
JsonneD jd = JsonneD();
JsonnetValue copy;

{
	JsonnetValue sv = jd.makeString(s);
	copy = sv;
}

Nullable!string ss = copy.extractString();
assert(!ss.isNull());
assert(s == ss);

Meta