> For the complete documentation index, see [llms.txt](https://200ok.gitbook.io/200ok-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://200ok.gitbook.io/200ok-documents/user-manual/utilities/json-to-apex.md).

# Json To Apex

200 OK comes with Utility to create Apex wrapper class out of any given JSON. This utility can be used via a Quick Action button on the Integration channel record page.

**Let us see how to configure this :**&#x20;

1. Click on the New button in 200 OK studio tab.
2. Create a channel with required data by passing the method, url, body etc.
3. After passing the data save and active the channel.
4. In the right top click on the dropdown, we can see option **Json To Apex** as shown in the below image.

<figure><img src="https://1271267903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F899iGp7icc9A7KXck3HI%2Fuploads%2FSK7bXQOBmfknDlFrYIbj%2Fimage%20(14).png?alt=media&amp;token=87903107-6686-4afb-9521-ae034213e333" alt=""><figcaption></figcaption></figure>

5. On click of this button a screen flow will appear which has two fields

   1. Class Name
   2. Class body (JSON).

6. By default the class name is the same as Channel Name, but the user can give any name. Pass the JSON in the Class body field for which you want to create the wrapper class.

<figure><img src="https://1271267903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F899iGp7icc9A7KXck3HI%2Fuploads%2FokKEGbvydEoG4xvGf68v%2Fimage%20(15).png?alt=media&amp;token=1cabe860-fa00-4bb6-99d1-0bac0f03237f" alt=""><figcaption></figcaption></figure>

7. After passing the json click on the Submit button. Two classes with serializable and deserializable invocable methods will be generated along with the test classes.&#x20;

<figure><img src="https://1271267903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F899iGp7icc9A7KXck3HI%2Fuploads%2FDuktMqZR7rofhXeKsMeB%2Fimage%20(16).png?alt=media&amp;token=08bdc870-46f1-43c0-818d-10c41b72dcb3" alt=""><figcaption></figcaption></figure>

8. Go to Setup and type Apex class in the quick find box. Click on the apex class and you can find the generated class along with the test classes

**Apex class in setup**

<figure><img src="https://1271267903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F899iGp7icc9A7KXck3HI%2Fuploads%2FY9m2e1jR5mChaQr8AHfo%2Faq2.png?alt=media&amp;token=796710e5-2bb0-49bd-975f-b50c605a751d" alt=""><figcaption></figcaption></figure>

This is how we can confgiure and use Json To Apex.&#x20;
