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

"Finally, correct UTF-8 and charset handling" (e9d01967ac) broke ordered json

Open
#1,793 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
perl
Domain
backend

Research direction

Start by locating _ensure_characters and tracing how Tie::IxHash values move into JSON::MaybeXS. Preserve ordered keys through that handling, then verify that resources can still return JSON in the requested order without Dancer-specific workarounds.

Written by the indexing model from the issue text.

Description

We have some cases where it weirdly enough is required to return a json structure with keys in a certain order.

For that we've used Tie::IxHash and that has before gotten passed all the way down through Dancer and into JSON::MaybeXS and it all has worked well.

In "Finally, correct UTF-8 and charset handling" (e9d01967ac) , the hash is rewritten in _ensure_characters which turns it from our Tie::IxHash into a normal unordered hash, which breaks our ordering.

It would be nice if we could still return our super special ordered json without needing to do ugly hacking on Dancer.

If that's not the case, we'll look into writing our own Serializer for those resources.

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.