Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow Mutable serializer to render templates?

Open
#1,556 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
perl
Domain
api, backend

Research direction

Start by reviewing the Mutable serializer behavior for Accept headers and the linked Mojolicious respond_to helper. The issue does not identify files or tests; the work is done when the project has agreed on an API and clear template-selection behavior for HTML alongside JSON/XML responses.

Written by the indexing model from the issue text.

Description

Enhancement Needs Rework Question

It could be useful to return a data structure from a route handler and have it automatically serialized to JSON/XML or rendered in a template depending on Accept: header supplied by the user. Right now we have a Mutable serializer which chooses a serializer based on headers, but no way to render a template if user asks for text/html instead.

Mojolicious has respond_to helper which achieves this. Could Mutable serializer be extended to allow similar things? Right now it's not obvious how it would determine the template to render.

Feel free to point out the obvious solution I am missing, talk me out of returning HTML or JSON from the same route, or suggest alternative API designs. I can help with the implementation too, once there is consensus on how it should behave.

Dominant language
Perl
Stars
604
Forks
287
Avg merge
1d 9h
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerlDancer/Dancer2

All issues in PerlDancer/Dancer2

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.