Commit 84ce256
committed
Output nested tables last
The TOML format has a restriction that if a table itself contains
tables, all keys with non-table values must be emitted first. This led
to the following error:
$ echo '{"a": {}, "b": 1}' | rq -T
[ERROR] [rq] Encountered: TOML serialize error
[ERROR] [rq] Caused by: values must be emitted before tables
Fix this by using tables_last to output the tables after other keys.
This affects all output formats that serialize using serde. The ordering
is unimportant in the other formats, so that is harmless. The
performance impact should be small.1 parent 99b4946 commit 84ce256
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
0 commit comments