for k in sorted(list(d.keys()), key=lambda k: ordering[k]):
    outlist[-1].append(json.dumps({k: d[k]}))
for i, l in enumerate(outlist):
    outlist[i] = '{' + ','.join(s[1:-1] for s in outlist[i]) + '}'
s = '[' + ','.join(outlist) + ']'
пользовательский порядок JSON sort_keys в Python