json() — astro Function Reference
Architecture documentation for the json() function in cookies.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD bbea8104_7939_af5c_ec51_0bf2a721e9a1["json()"] 9019ce5c_5105_281b_be6c_cc494b6e05a2["AstroCookie"] bbea8104_7939_af5c_ec51_0bf2a721e9a1 -->|defined in| 9019ce5c_5105_281b_be6c_cc494b6e05a2 style bbea8104_7939_af5c_ec51_0bf2a721e9a1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/cookies/cookies.ts lines 50–55
json() {
if (this.value === undefined) {
throw new Error(`Cannot convert undefined to an object.`);
}
return JSON.parse(this.value);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does json() do?
json() is a function in the astro codebase, defined in packages/astro/src/core/cookies/cookies.ts.
Where is json() defined?
json() is defined in packages/astro/src/core/cookies/cookies.ts at line 50.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free