{"record":{"id":"db9d131010b8c252","repo":"langchain-ai/langgraph","slug":"refused-to-deserialize-json-constructor-dotted","errorCode":null,"errorMessage":"Refused to deserialize JSON constructor: {dotted}. No allowed_json_modules configured.\n\nUnblock with ONE of:\n  • JsonPlusSerializer(allowed_json_modules=[{needed!r}, ...])\n  • (DANGEROUS) JsonPlusSerializer(allowed_json_modules=True)\n\nNote: Prefix allowlists are intentionally unsupported; prefer exact symbols or plain-JSON representations revived without import-time side effects.","messagePattern":"Refused to deserialize JSON constructor: (.+?)\\. No allowed_json_modules configured\\.\n\nUnblock with ONE of:\n  • JsonPlusSerializer\\(allowed_json_modules=\\[(.+?), \\.\\.\\.\\]\\)\n  • \\(DANGEROUS\\) JsonPlusSerializer\\(allowed_json_modules=True\\)\n\nNote: Prefix allowlists are intentionally unsupported; prefer exact symbols or plain-JSON representations revived without import-time side effects\\.","errorType":"exception","errorClass":"InvalidModuleError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py","lineNumber":234,"sourceCode":"                \"(legacy_method_field=%s, error=%s); returning None\",\n                \".\".join((*module, name)),\n                \"method\" in value,\n                type(exc).__name__,\n            )\n            return None\n\n    def _check_allowed_json_modules(self, value: dict[str, Any]) -> None:\n        needed = tuple(value[\"id\"])\n        dotted = \".\".join(needed)\n        # Safe types (the same set already allowed for msgpack deserialization) are\n        # permitted without an explicit allowlist — they are known-safe LangGraph and\n        # LangChain types.  This restores backwards-compat for old \"json\" checkpoints\n        # that pre-date the msgpack migration without reopening the broader security gate.\n        if _is_safe_json_type(list(needed)):\n            return\n\n        if not self._allowed_json_modules:\n            raise InvalidModuleError(\n                f\"Refused to deserialize JSON constructor: {dotted}. \"\n                \"No allowed_json_modules configured.\\n\\n\"\n                \"Unblock with ONE of:\\n\"\n                f\"  • JsonPlusSerializer(allowed_json_modules=[{needed!r}, ...])\\n\"\n                \"  • (DANGEROUS) JsonPlusSerializer(allowed_json_modules=True)\\n\\n\"\n                \"Note: Prefix allowlists are intentionally unsupported; prefer exact symbols \"\n                \"or plain-JSON representations revived without import-time side effects.\"\n            )\n\n        if self._allowed_json_modules is True:\n            return\n        if needed in self._allowed_json_modules:\n            return\n\n        raise InvalidModuleError(\n            f\"Refused to deserialize JSON constructor: {dotted}. \"\n            \"Symbol is not in the deserialization allowlist.\\n\\n\"\n            \"Add exactly this symbol to unblock:\\n\"","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py#L216-L252","documentation":"Error \"Refused to deserialize JSON constructor: {dotted}. No allowed_json_modules configured.\n\nUnblock with ONE of:\n  • JsonPlusSerializer(allowed_json_modules=[{needed!r}, ...])\n  • (DANGEROUS) JsonPlusSerializer(allowed_json_modules=True)\n\nNote: Prefix allowlists are intentionally unsupported; prefer exact symbols or plain-JSON representations revived without import-time side effects.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py:234 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":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}