Which would additionally preserve trivial human-readability of the stored numbers - one of the reasons of choosing JSON in the first place.
This scheme is still human readable, you just have to skip the length prefix and you get a simple number after that. It's not really human-writeable however...
Although if you wanted to save space you could also store the number itself in a bigger base to reduce the number of "digits".
That is right, if you have access to your comparator, then this is much easier. However, it would still not work well for negative numbers, and, in many cases you sit client side and do not have access to your database engine.
It's easy to extend the comparator to negative numbers, just check for the minus sign as well.
Better yet, implement a sort that handles numeric substrings: