MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / safeParse

Function safeParse

packages/agentflow/src/atoms/JsonInput.tsx:20–26  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

18const JSON_STYLE = { padding: 10, borderRadius: 10, marginTop: 8 }
19
20function safeParse(str: string): object {
21 try {
22 return str ? JSON.parse(str) : {}
23 } catch {
24 return {}
25 }
26}
27
28/**
29 * Interactive JSON tree editor atom.

Callers 1

JsonInputFunction · 0.85

Calls 1

parseMethod · 0.65

Tested by

no test coverage detected