> For the complete documentation index, see [llms.txt](https://docs.zeroauthority.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zeroauthority.xyz/the-dao/standard-reputation-framework/clarity-and-json-implementation.md).

# Clarity & JSON Implementation

To create a **Reputation (REP) badge** using Clarity and JSON, you need to manage onchain logic with Clarity and define metadata with JSON.

### Clarity

{% content-ref url="/pages/6H4CLdiAcT2qG35f4bvK" %}
[Clarity Contract](/the-dao/standard-reputation-framework/clarity-contract.md)
{% endcontent-ref %}

The Clarity contract facilitates batch endorsements, allowing authorized users to issue badges to multiple recipients. It verifies the issuer's authority and manages the process of adding badges (endorsements) to users' profiles. Key functions include `add-badge` (adds a badge to a user) and `endorse` (issues badges to multiple users at once).

### JSON

{% content-ref url="/pages/RbQUjZACacvApi4ucTet" %}
[JSON Metadata](/the-dao/standard-reputation-framework/json-metadata.md)
{% endcontent-ref %}

The JSON metadata defines the badge's attributes, such as its name, description, image, and criteria. It helps visually represent the badge and provides context, like the number of events engaged in or the date issued.

Example structure:

```json
{
  "name": "Community Engagement Badge",
  "description": "Awarded for actively engaging in community events.",
  "image": "https://example.com/badges/community-engagement.png",
  "attributes": [{"trait_type": "Engagement", "value": "5 events"}]
}
```

Together, Clarity handles issuing the badge, and JSON defines its visual and contextual properties.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zeroauthority.xyz/the-dao/standard-reputation-framework/clarity-and-json-implementation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
