{"record":{"id":"d850ee130e813119","repo":"projectdiscovery/nuclei","slug":"invalid-token-v-after-top-level-value","errorCode":null,"errorMessage":"invalid token '%v' after top-level value","messagePattern":"invalid token '(.+?)' after top-level value","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/reporting/trackers/linear/jsonutil/jsonutil.go","lineNumber":38,"sourceCode":"// the result in the GraphQL query data structure pointed to by v.\n//\n// The implementation is created on top of the JSON tokenizer available\n// in \"encoding/json\".Decoder.\nfunc UnmarshalGraphQL(data []byte, v any) error {\n\tdec := json.NewDecoder(bytes.NewReader(data))\n\tdec.UseNumber()\n\terr := (&decoder{tokenizer: dec}).Decode(v)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttok, err := dec.Token()\n\tswitch err {\n\tcase io.EOF:\n\t\t// Expect to get io.EOF. There shouldn't be any more\n\t\t// tokens left after we've decoded v successfully.\n\t\treturn nil\n\tcase nil:\n\t\treturn fmt.Errorf(\"invalid token '%v' after top-level value\", tok)\n\tdefault:\n\t\treturn err\n\t}\n}\n\n// decoder is a JSON decoder that performs custom unmarshalling behavior\n// for GraphQL query data structures. It's implemented on top of a JSON tokenizer.\ntype decoder struct {\n\ttokenizer interface {\n\t\tToken() (json.Token, error)\n\t}\n\n\t// Stack of what part of input JSON we're in the middle of - objects, arrays.\n\tparseState []json.Delim\n\n\t// Stacks of values where to unmarshal.\n\t// The top of each stack is the reflect.Value where to unmarshal next JSON value.\n\t//","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/reporting/trackers/linear/jsonutil/jsonutil.go#L20-L56","documentation":"Error \"invalid token '%v' after top-level value\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/reporting/trackers/linear/jsonutil/jsonutil.go:38 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}