[dancer-users] Incorrect attempts to serialize HTML

Andrew Beverley andy at andybev.com
Thu Oct 9 12:47:36 BST 2014

Hi guys,

I apologise in advance that this is rather vague, but I'm hoping that
someone might be able to point me in the right direction of where I
should be looking.

I'm getting some strange problems with Dancer2 and the "auto
serializer". I have

    set serializer => 'JSON';

in my app, but under some circumstances it is trying to serialize HTML
content, with the subsequent errors that you would expect of such an

The problems seem to be related to my error handling (using
Log::Report). My implementation is currently rather poor and
complicated, so I won't go into the details here, but I wondered whether
someone can point me to the relevant parts of the Dancer2 code that I
should start poking around in (in particular the code which detects
whether to serialize the data). I've looked at serialize() in
Serializer::Mutuble, but as far as I can tell this function is not being
called. Where else should I look?

If I remove the aforementioned serializer statement then everything
works as expected.



More information about the dancer-users mailing list