Added toFieldWithContext to Codec