date serialization messing up json endpoint