Skip to main content
Glama
json-stringify.ts474 B
function getCircularReplacer() { const seen = new WeakSet(); return (key : any, value : any) => { if (typeof value === "object" && value !== null) { if (seen.has(value)) { return; } seen.add(value); } if (typeof value === "bigint") { return value.toString(); } return value; }; } export function JSONStringify(object: object) { return JSON.stringify(object, getCircularReplacer()) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xiawpohr/mcpilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server