bottle.py を使用して API を構築しており、キーでソートされた json を返したいと考えています。コードは次のとおりです。
@route('/test', method='GET')
def sorted():
return {'z': 'should be last', 'm': 'should be second', 'a': 'should be first'}
残念ながら戻ってきます
{"a": "should be first", "z": "should be last", "m": "should be second"}
私が返してほしいのは
{"a": "should be first", "m": "should be second", "z": "should be last"}
どんな助けでも大歓迎です。