<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@contract-case/case-definition-dsl](./case-definition-dsl.md) &gt; [states](./case-definition-dsl.states.md) &gt; [AnyState](./case-definition-dsl.states.anystate.md) &gt; [stringify](./case-definition-dsl.states.anystate.stringify.md)

## states.AnyState.stringify() method

You shouldn't need to override this method. You don't need to call this method, unless working on a wrapper for ContractCase.

This method returns the entire state descriptor as a JSON string, as a convenience so that wrapper libraries don't need to figure out how to walk a tree of example objects.

**Signature:**

```typescript
stringify(): string;
```

**Returns:**

string

A JSON string representation of this state.
