Function toJsonString

Convert a Throwable to a json string

string toJsonString (
  object.Throwable throwable
);

Example

convert a Throwable to json

auto exception = new Exception("some message", __FILE__, 58);
exception.toJsonString.should.equal(`{"file":"lifecycle/trial/interfaces.d","line":"58","msg":"some message","info":"null","raw":"object.Exception@lifecycle/trial/interfaces.d(58): some message"}`);