Strange behaviour of to!string and JSON

Suliman via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 3 00:46:44 PST 2015


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


More information about the Digitalmars-d mailing list