For the former, you really need to sort the keys. If you ever end up passing the JSON through any other encode/decode step, your ETags will break and it won't be obvious why.
For hand-written JSON, I'm not sure there's a good solution besides modding the users' editors to sort for them.
For hand-written JSON, I'm not sure there's a good solution besides modding the users' editors to sort for them.