use gap json encoder (which handles datetime)