add test for sorting of fields the same way encoding/json does