My programming and teaching blog

Intro to D metaprogramming - Creating a JSON serialiser

Created on 31/10/2019 | Updated on 07/05/2020 Status: finished

A series of blog posts that cover how to create a basic JSON serialiser in D, while teaching several different aspects of D's metaprogramming, such as templates; template arguments; function contracts; static if; static foreach; mixins; and more.

  1. Serialising basic D types
  2. Serialising basic D types - Alternative function layout
  3. Serialising structs
  4. Serialising enums and classes
  5. Serialising arrays
  6. Using UDAs for customisation
  7. Mixin template to automate static deserialise