Home / Function/ toJSON() — svelte Function Reference

toJSON() — svelte Function Reference

Architecture documentation for the toJSON() function in compile_diagnostic.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  d9e70589_d758_5c9d_ac32_e173ee431962["toJSON()"]
  fca2e303_5d6d_304a_d0fc_14ab13a1ecb7["CompileDiagnostic"]
  d9e70589_d758_5c9d_ac32_e173ee431962 -->|defined in| fca2e303_5d6d_304a_d0fc_14ab13a1ecb7
  1bee6dd1_d84e_0e1b_05bc_412879aaae6a["toJSON()"]
  1bee6dd1_d84e_0e1b_05bc_412879aaae6a -->|calls| d9e70589_d758_5c9d_ac32_e173ee431962
  style d9e70589_d758_5c9d_ac32_e173ee431962 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/utils/compile_diagnostic.js lines 96–106

	toJSON() {
		return {
			code: this.code,
			message: this.message,
			filename: this.filename,
			start: this.start,
			end: this.end,
			position: this.position,
			frame: this.frame
		};
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does toJSON() do?
toJSON() is a function in the svelte codebase, defined in packages/svelte/src/compiler/utils/compile_diagnostic.js.
Where is toJSON() defined?
toJSON() is defined in packages/svelte/src/compiler/utils/compile_diagnostic.js at line 96.
What calls toJSON()?
toJSON() is called by 1 function(s): toJSON.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free