For another implementation, find the functions toJson and toJsonValue in my web.d http://arsdnet.net/dcode/web.d Bascially: foreach(member; item.tupleof) { static if(is(typeof(member) == something) json it else static if.... repeat for supported type families }