void login(HTTPServerRequest req, HTTPServerResponse res)
{
Json request = req.json;
writeln(to!string(request["username"]));
writeln(request["username"].to!string);
}
Why first code print output with quotes, and second not?
"asd"
asd
Am 03.12.2015 um 09:46 schrieb Suliman:
void login(HTTPServerRequest req, HTTPServerResponse res)
{
Json request = req.json;
writeln(to!string(request["username"]));
writeln(request["username"].to!string);
}
Why first code print output with quotes, and second not?
"asd"
asd
The first one
On Thursday, 3 December 2015 at 08:46:44 UTC, Suliman wrote:
void login(HTTPServerRequest req, HTTPServerResponse res)
{
Json request = req.json;
writeln(to!string(request["username"]));
writeln(request["username"].to!string);
}
Why first code print output with quotes, and second not?
"asd"
a
On Thursday, 3 December 2015 at 10:17:17 UTC, Sönke Ludwig wrote:
But isn't there a way to customize std.conv.to!T for T other
than string?
I believe you do that by implementing opCast?
Am 03.12.2015 um 12:18 schrieb Vladimir Panteleev:
On Thursday, 3 December 2015 at 10:17:17 UTC, Sönke Ludwig wrote:
But isn't there a way to customize std.conv.to!T for T other than string?
I believe you do that by implementing opCast?
Right, forgot about that. Unfortunately that would stre