D-Programming-Language/phobos — pull request #2120 by AndrejMitrovic (2014-04-24 15:43:45+00:00)
Title: Issue 4493 - Add sorting capability to toJSON and add another unittest

https://issues.dlang.org/show_bug.cgi?id=4493

This was originally an issue with the unittests, but I thought it could become an enhancement request.

The only problem is the allocation. I don't suppose there's a way to lazily sort by the keys, is there?