… | |
… | |
471 | |
471 | |
472 | // for canonical output we have to sort by keys first |
472 | // for canonical output we have to sort by keys first |
473 | // actually, this is mostly due to the stupid so-called |
473 | // actually, this is mostly due to the stupid so-called |
474 | // security workaround added somewhere in 5.8.x |
474 | // security workaround added somewhere in 5.8.x |
475 | // that randomises hash orderings |
475 | // that randomises hash orderings |
476 | if (enc->json.flags & F_CANONICAL) |
476 | if (enc->json.flags & F_CANONICAL && !SvRMAGICAL (hv)) |
477 | { |
477 | { |
478 | int count = hv_iterinit (hv); |
478 | int count = hv_iterinit (hv); |
479 | |
479 | |
480 | if (SvMAGICAL (hv)) |
480 | if (SvMAGICAL (hv)) |
481 | { |
481 | { |