> ## Documentation Index
> Fetch the complete documentation index at: https://docs.athina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# JSON Evals

Athina supports 2 types of JSON evals:

1. **JSON Schema:** This checks the structure of the JSON object to make sure it has the required fields, and that the types of the fields match the expected structure.
2. **JSON Validation:**: This checks the LLM-generated JSON object against a ground-truth object to see if they match.

<div
  style={{
position: "relative",
paddingBottom: "60.40268456375839%",
height: "0",
}}
>
  <iframe
    src="https://www.loom.com/embed/ca2beb3342a94239b49ef58b34b28951"
    frameBorder="0"
    webkitAllowFullScreen
    mozAllowFullScreen
    allowFullScreen
    style={{
  position: "absolute",
  top: "0",
  left: "0",
  width: "100%",
  height: "100%",
}}
  />
</div>

## JSON Schema

The JSON Schema eval is used to check the structure of the JSON object to make sure it has the required fields, and that the types of the fields match the expected structure.

The JSON Schema must be defined in [JSON Schema format](https://json-schema.org/). In the UI, you can also import a sample JSON object and generate a JSON Schema from it.

To try this eval please refer to the [examples](/api-reference/evals/preset-evals/function-evals#jsonschema) .

## JSON Validation

The JSON Validation eval is used to check the LLM-generated JSON object against a ground-truth object.

You may specify validation rules to indicate which fields should be compared and how they should be compared.

The field to be compared must be specified in JSON Path format (e.g., `$.field1.field2`). See the [JSON Path documentation](https://github.com/json-path/JsonPath) to learn more.

To try this eval please refer to the [examples](/api-reference/evals/preset-evals/function-evals#JsonValidation) .
