{"record":{"id":"d4c9c243c59c1ab2","repo":"AykutSarac/jsoncrack.com","slug":"invalid","errorCode":null,"errorMessage":"Invalid","messagePattern":"Invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/www/src/features/editor/BottomBar.tsx","lineNumber":118,"sourceCode":"    if (data?.name) window.document.title = `${data.name} | JSON Crack`;\n  }, [data]);\n\n  return (\n    <StyledBottomBar>\n      <StyledLeft>\n        <Tooltip label=\"Close editor\" position=\"bottom\" withArrow openDelay={750}>\n          <StyledBottomBarItem onClick={toggleEditor} aria-label=\"close editor\">\n            <LuPanelLeftClose size={14} />\n          </StyledBottomBarItem>\n        </Tooltip>\n        <StyledBottomBarItem>\n          {error ? (\n            <Popover width=\"auto\" shadow=\"md\" position=\"top\" withArrow>\n              <Popover.Target>\n                <Flex align=\"center\" gap={2}>\n                  <VscError color=\"red\" />\n                  <Text c=\"red\" fw={500} fz=\"xs\">\n                    Invalid\n                  </Text>\n                </Flex>\n              </Popover.Target>\n              <Popover.Dropdown style={{ pointerEvents: \"none\" }}>\n                <Text size=\"xs\">{error}</Text>\n              </Popover.Dropdown>\n            </Popover>\n          ) : (\n            <Flex align=\"center\" gap={2}>\n              <VscCheck />\n              <Text size=\"xs\">Valid</Text>\n            </Flex>\n          )}\n        </StyledBottomBarItem>\n        <StyledBottomBarItem\n          onClick={() => {\n            toggleLiveTransform(!liveTransformEnabled);\n            gaEvent(\"toggle_live_transform\");","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/AykutSarac/jsoncrack.com/blob/3c9af69e23c635356293b6b28cf4cd0af10d1059/apps/www/src/features/editor/BottomBar.tsx#L100-L136","documentation":"The 'Invalid' label appears in the editor bottom bar whenever the error state in useFile is truthy. That state is set by setContents when contentToJson throws (invalid JSON/YAML/XML/CSV) or by Monaco's onValidate in TextEditor via errors[0]?.message. The popover reveals the underlying message. This is a display-only indicator, not a thrown error.","triggerScenarios":"User types invalid JSON (trailing comma, unclosed brace) in the editor; switching format to YAML/CSV with content that does not parse in that format; loading a file whose content does not match its extension; a configured JSON schema rejecting the document.","commonSituations":"Transient mid-edit syntax errors (expected); format mismatch after changing the format selector; schema validation failure when jsonSchema is set; 'stuck' invalid state after a bad paste.","solutions":["Hover the popover to read the exact message and fix the cited location.","If a JSON schema is configured, ensure it matches the document.","Toggle live-transform off to defer validation while bulk-editing.","Re-paste clean content to clear a stuck invalid state."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate content matches the selected format before setContents\nasync function isValidForFormat(value: string, format: FileFormat): Promise<boolean> {\n  try {\n    await contentToJson(value, format);\n    return true;\n  } catch {\n    return false;\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read the popover text — it carries the exact parse error and location to fix.","When a JSON schema is configured, confirm it matches the document; otherwise clear jsonSchema.","Toggle live-transform off while bulk-editing to avoid noisy transient invalid states."],"tags":["validation","monaco","ui-text","editor"],"backgroundTag":null,"analyzedSha":"3c9af69e23c635356293b6b28cf4cd0af10d1059","analyzedAt":"2026-08-12T19:00:27.891Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}