{"record":{"id":"0e818b11a40aacf9","repo":"mikefarah/yq","slug":"only-keyvalue-pairs-are-supported-in-inlinetables","errorCode":null,"errorMessage":"only keyvalue pairs are supported in inlinetables, got %v instead","messagePattern":"only keyvalue pairs are supported in inlinetables, got (.+?) instead","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/yqlib/decoder_toml.go","lineNumber":137,"sourceCode":"\t\tdefault:\n\t\t\t// run out of key values\n\t\t\tlog.Debugf(\"done in decodeKeyValuesIntoMap, gota a %v\", nextItem.Kind)\n\t\t\treturn true, nil\n\t\t}\n\t}\n\tlog.Debug(\"no more things to read in\")\n\treturn false, nil\n}\n\nfunc (dec *tomlDecoder) createInlineTableMap(tomlNode *toml.Node) (*CandidateNode, error) {\n\tcontent := make([]*CandidateNode, 0)\n\tlog.Debug(\"createInlineTableMap\")\n\n\titerator := tomlNode.Children()\n\tfor iterator.Next() {\n\t\tchild := iterator.Node()\n\t\tif child.Kind != toml.KeyValue {\n\t\t\treturn nil, fmt.Errorf(\"only keyvalue pairs are supported in inlinetables, got %v instead\", child.Kind)\n\t\t}\n\n\t\tkeyValues := &CandidateNode{\n\t\t\tKind: MappingNode,\n\t\t\tTag:  \"!!map\",\n\t\t}\n\n\t\tif err := dec.processKeyValueIntoMap(keyValues, child); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcontent = append(content, keyValues.Content...)\n\t}\n\n\treturn &CandidateNode{\n\t\tKind:       MappingNode,\n\t\tTag:        \"!!map\",\n\t\tEncodeHint: EncodeHintInline,","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/mikefarah/yq/blob/8b5af0694bb82b41d4ae180fac9972029066f90a/pkg/yqlib/decoder_toml.go#L119-L155","documentation":"While walking the children of a TOML inline table (the { ... } form), createInlineTableMap encountered a child node whose Kind is not toml.KeyValue — e.g. a nested table declaration or a stray token. Inline tables in TOML may only contain key/value pairs, so the parsed AST violates that expectation and decoding is aborted.","triggerScenarios":"Thrown at pkg/yqlib/decoder_toml.go:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move nested table syntax out of the inline table into regular [table] sections","Keep inline tables limited to key = value pairs","Check for a missing comma or brace that made the parser attach a non-keyvalue node"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b5af0694bb82b41d4ae180fac9972029066f90a","analyzedAt":"2026-09-05T10:57:22.766Z","contentChangedAt":"2026-09-05T10:57:22.766Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}