{"uid":"cap_VFawVU0n-WREaqh-6hKBI","slug":"delx-commerce-json-escape-23f38b32","name":"Delx Commerce JSON Escape","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/json-escape?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."}}},"responseSchema":{"type":"json","example":{"text":"say \\\"hello\\\"\\nline2","schema":"delx/util-json-escape/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BsOt3h10IyaM5rbUMosKF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Escapes special characters in a string to produce valid JSON-safe text","exampleAgentPrompt":"Can you JSON-escape this string for me so I can safely embed it in a JSON payload: 'say \"hello\"\nline2'?","exampleUseCases":[{"title":"Safe JSON embedding for LLM outputs","prompt":"I need to embed this LLM-generated text inside a JSON field — can you escape it properly so the quotes and newlines don't break the JSON: 'She said \"great job!\"\nSee you tomorrow'?"},{"title":"Sanitizing user input before API call","prompt":"A user submitted this comment and I need to put it in a JSON body — can you JSON-escape it for me: 'He\\s reply was: \"no way!\"\ttabbed.'?"},{"title":"Preparing log messages for JSON storage","prompt":"I have a multi-line error log message I want to store as a JSON string value — please escape it: 'Error: file not found\nPath: C:\\\\Users\\\\admin\\\\file.txt'."}],"resultDescription":"Returns a JSON object containing the escaped version of the input text (with quotes, newlines, backslashes, and other special characters properly escaped) along with the schema identifier 'delx/util-json-escape/v1'.","failureModes":["Empty or missing 'text' field returns an error","Extremely large input strings may be rejected or time out","Payment failure via x402 protocol results in 402 response before processing","Malformed request body returns 400-level error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a reliable, pay-per-use utility to JSON-escape arbitrary strings without setting up a server-side library — especially useful in agent pipelines that process untrusted or dynamic text that must be embedded in JSON payloads, and where a simple hosted microservice is preferable to implementing escape logic inline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:59.431Z","isFirstParty":false,"canonicalSlug":"delx-commerce-json-escape-23f38b32"}