P.S. The `.toJSON()` part is the bit I'm surprised by.