Dancer...::JSON(3pm)
π Dancer::Serializer::JSON β bestie edition π
okay so you're reading the manual page for Dancer::Serializer::JSON (a 3pm page, iykyk) and honestly? it's giving "small but mighty." let's get into it π«Ά
β¨ NAME β¨
Dancer::Serializer::JSON β the serializer that handles your JSON data. that's the whole job. and it ate. π
πΈ VERSION πΈ
this is version 1.3522 β very much the version we're talking about, no cap.
π¦ SYNOPSIS π¦
soβ¦ there's literally nothing here. the SYNOPSIS section is empty. iconic of it, honestly. the real tea is all down in DESCRIPTION, so keep scrolling π
π DESCRIPTION π
so this class is the lil interface between Dancer's serializer engine abstraction layer and the JSON module. like, it's the middle bestie making the introduction. π€
to actually use this engine, you set the template setting:
serializer: JSON
and you can do that either in your config.yml file or directly in your app code using the set keyword. easy. also β plot twist β this serializer will also get used when the serializer is set to mutable and the correct Accept headers are supplied. so yes, it's showing up uninvited, but in a helpful way. π
the JSON module will pass configuration variables straight through, which is lowkey so useful. some of them are genuinely amazing when you're debugging/developing your app: that's pretty and canonical. and some others are super handy with ORMs like DBIx::Class: that's allow_blessed and convert_blessed.
bestie, for more info and a full list of configuration settings, please consult the JSON documentation. don't guess, just read it. π
to turn these on, you add extra settings to the engine's configuration. like this, for example:
engines:
JSON:
allow_blessed: '1'
canonical: '1'
convert_blessed: '1'
look at that. chef's kiss. π§
β METHODS β
π serialize
Serialize a data structure to a JSON structure. it takes your data structure and makes it JSON. slay.
π deserialize
Deserialize a JSON structure to a data structure. the reverse vibe β JSON goes in, data structure comes out. π₯
π content_type
Return 'application/json'. that's it. that's what it returns. periodt. π
π AUTHOR π
Dancer Core Developers β the whole squad. we stan. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2010 by Alexis Sukrieh.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
so yes, free software, go wild, but respect the terms, fr fr. π«Ά
and that's the whole page, bestie!! this was generated by perl v5.40.1 on 2026-05-05 β so if you're reading it later, hi from the past, hope you're hydrated π§β¨ bye mwah ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: libdancer-perl 1.3522-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms