fix: encode mixed arrays with inline table elements

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-17 19:49:50 +02:00
parent 2737a5ac87
commit 3ac0b1e301
5 changed files with 157 additions and 3 deletions
+3 -1
View File
@@ -156,7 +156,9 @@ type Unmarshaler interface {
// - Slices and arrays of structs or maps become TOML arrays of tables; a
// nil or empty array of tables is omitted (TOML forbids an empty `[[a]]`),
// while other empty arrays emit as `key = []`.
// - Other slices and arrays become TOML arrays.
// - Other slices and arrays become TOML arrays; a table element inside a
// value array (for example an inline table in a mixed array) emits as an
// inline table.
// - Scalars encode as TOML scalars: bool, int64, float64, string, time.Time
// (offset date-time), and LocalDateTime/LocalDate/LocalTime (local
// variants).