compile time introspection and code generation - automatically serialize to json

Adam Ruppe destructionator at gmail.com
Thu Jul 21 08:14:40 PDT 2011


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
}


More information about the Digitalmars-d-learn mailing list