我正在尝试使用Swift4的Encodable+JSONEncoder将结构序列化为字符串。该对象可以保存异构值,如String、Array、Date、Int等。除了Date之外,使用的方法工作正常。JSONEncoder的dateEncodingStrategy属性没有任何效果。这是一个在Playground中重现行为的片段:structEncodableValue:Encodable{varvalue:Encodableinit(_value:Encodable){self.value=value}funcencode(toencoder:Encoder)throws{tryval