> There is no clear evidence that the toJSON method is actually used when a message go through the worker's port

I don't know, MDN docs state that *Objects are serialized as they're handed to the worker, and subsequently, de-serialized on the other end*. I'd be highly surprised they don't use standard JSON implementation there.

> I want to make it clear about what is happening

Explicit over implicit sounds good, though here it makes things more verbose with not much added value for the developer imho. Matter of taste probably.

> An SPA effectively expect nothing else than data structures. Thus, we should not use our "business logic" objects directly with the SPA interface

Makes sense, though if serialization is achieved behind the scene they'll receive the expected raw data structures… did I miss something?