Open MazeChaZer opened 7 years ago
That makes sense. There's no deserialize counterpart, right? Also I would use the existing _toString function, which should do the right thing and is a bit more optimized than the generic formatter.
Also keep in mind that there's still an open TODO to finalize the PHP serialize/deserialize format.
Sounds good 👍 Yeah, AFAIK, there is no interface for JSON deserialization. I will start working on this.
Does it make sense for
LocalDate
,LocalDateTime
, ... to implement the JsonSerializable PHP interface? That would ease the serialization of objects with date/time properties. I believe a sensible serialization strategy would be using the ISO DateTimeFormatters to turn the date/time objects into strings. If this is a feature that is wanted, I can prepare a pull request.