Switch to classmethods, add datetime decoder.