{
  "x402Version": 2,
  "id": 28687,
  "slug": "28687",
  "resource": "https://agent.atinamos.co.uk/agent/json-repair",
  "description": "Deterministic JSON validation and conservative repair for AI-agent payloads. Repairs unquoted object keys, single-quoted strings, trailing commas, Markdown code fences, UTF-8 BOMs and JSON-compatible Python literals, including nested or repeated defects. No LLM or invented data; every applied transformation is reported.",
  "type": "http",
  "serviceName": "Atinamos JSON Validate / Repair",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x105bc7a04eec0c162342874110084dfe01996435",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "error": {
            "type": "object"
          },
          "input_bytes": {
            "type": "integer"
          },
          "json": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "validate",
              "repair"
            ],
            "type": "string"
          },
          "price_usdc": {
            "const": 0.005,
            "type": "number"
          },
          "repairs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "result": {},
          "schema": {
            "type": "string"
          },
          "service": {
            "const": "json-repair",
            "type": "string"
          },
          "status": {
            "enum": [
              "valid",
              "repaired",
              "invalid"
            ],
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "service",
          "price_usdc",
          "schema",
          "mode",
          "status",
          "valid",
          "changed",
          "repairs",
          "input_bytes"
        ],
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "json": "{foo: 'bar', broken: true,}",
            "mode": "repair"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "changed": true,
            "input_bytes": 27,
            "json": "{\"broken\":true,\"foo\":\"bar\"}",
            "mode": "repair",
            "price_usdc": 0.005,
            "repairs": [
              "converted_single_quoted_strings",
              "quoted_unquoted_object_keys",
              "removed_trailing_commas"
            ],
            "result": {
              "broken": true,
              "foo": "bar"
            },
            "schema": "atinamos.json-repair.v0.1",
            "service": "json-repair",
            "status": "repaired",
            "valid": true
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "json": {
                    "description": "JSON or JSON-like text to validate or conservatively repair. Supported repairs include unquoted object keys, single-quoted strings, trailing commas, Markdown fences, UTF-8 BOMs and JSON-compatible Python literals.",
                    "maxLength": 262144,
                    "type": "string"
                  },
                  "mode": {
                    "default": "repair",
                    "enum": [
                      "validate",
                      "repair"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "json"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST",
                  "PUT",
                  "PATCH"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "properties": {
                  "changed": {
                    "type": "boolean"
                  },
                  "error": {
                    "type": "object"
                  },
                  "input_bytes": {
                    "type": "integer"
                  },
                  "json": {
                    "type": "string"
                  },
                  "mode": {
                    "enum": [
                      "validate",
                      "repair"
                    ],
                    "type": "string"
                  },
                  "price_usdc": {
                    "const": 0.005,
                    "type": "number"
                  },
                  "repairs": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "result": {},
                  "schema": {
                    "type": "string"
                  },
                  "service": {
                    "const": "json-repair",
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "valid",
                      "repaired",
                      "invalid"
                    ],
                    "type": "string"
                  },
                  "valid": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "service",
                  "price_usdc",
                  "schema",
                  "mode",
                  "status",
                  "valid",
                  "changed",
                  "repairs",
                  "input_bytes"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "json-repair",
    "json-validation",
    "structured-data",
    "payload-repair",
    "agent-utility",
    "bazaar"
  ],
  "sourceHost": "agent.atinamos.co.uk",
  "lastUpdated": "2026-10-09T10:18:56.778Z",
  "quality": {
    "calls30d": 4,
    "uniquePayers30d": 4,
    "lastCalledAt": "2026-10-09T10:18:56.166Z"
  },
  "metadata": {
    "serviceName": "Atinamos JSON Validate / Repair",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "json": "{foo: 'bar', broken: true,}",
              "mode": "repair"
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "changed": true,
              "input_bytes": 27,
              "json": "{\"broken\":true,\"foo\":\"bar\"}",
              "mode": "repair",
              "price_usdc": 0.005,
              "repairs": [
                "converted_single_quoted_strings",
                "quoted_unquoted_object_keys",
                "removed_trailing_commas"
              ],
              "result": {
                "broken": true,
                "foo": "bar"
              },
              "schema": "atinamos.json-repair.v0.1",
              "service": "json-repair",
              "status": "repaired",
              "valid": true
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "json": {
                      "description": "JSON or JSON-like text to validate or conservatively repair. Supported repairs include unquoted object keys, single-quoted strings, trailing commas, Markdown fences, UTF-8 BOMs and JSON-compatible Python literals.",
                      "maxLength": 262144,
                      "type": "string"
                    },
                    "mode": {
                      "default": "repair",
                      "enum": [
                        "validate",
                        "repair"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "json"
                  ],
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST",
                    "PUT",
                    "PATCH"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "properties": {
                    "changed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object"
                    },
                    "input_bytes": {
                      "type": "integer"
                    },
                    "json": {
                      "type": "string"
                    },
                    "mode": {
                      "enum": [
                        "validate",
                        "repair"
                      ],
                      "type": "string"
                    },
                    "price_usdc": {
                      "const": 0.005,
                      "type": "number"
                    },
                    "repairs": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "result": {},
                    "schema": {
                      "type": "string"
                    },
                    "service": {
                      "const": "json-repair",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "valid",
                        "repaired",
                        "invalid"
                      ],
                      "type": "string"
                    },
                    "valid": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "service",
                    "price_usdc",
                    "schema",
                    "mode",
                    "status",
                    "valid",
                    "changed",
                    "repairs",
                    "input_bytes"
                  ],
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "agent.atinamos.co.uk",
    "manifest_name": "agent.atinamos.co.uk",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {
      "changed": true,
      "error": {},
      "input_bytes": 0,
      "json": "string",
      "mode": "validate",
      "price_usdc": 0,
      "repairs": [
        "string"
      ],
      "result": null,
      "schema": "string",
      "service": "string",
      "status": "valid",
      "valid": true
    },
    "type": "string"
  }
}