# ExpectationSuite from .json file

**URL:** <https://discourse.greatexpectations.io/t/expectationsuite-from-json-file/2017>\
**Category:** GX Core Support\
**Tags:** types-of-expectation\
**Created:** [December 3, 2024, 11:45pm UTC](https://discourse.greatexpectations.io/t/expectationsuite-from-json-file/2017 "2024-12-03T23:45:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bidek56](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@bidek56](https://discourse.greatexpectations.io/u/bidek56)\
**Post date:** [December 3, 2024, 11:45pm UTC](https://discourse.greatexpectations.io/t/expectationsuite-from-json-file/2017/1 "2024-12-03T23:45:10Z")

</div>

Using GE 1.2.4, how do I import ExpectationSuite from .json file like this one? thx

```auto
{
    "name": "attribute",
    "meta": {
        "great_expectations. __version__": "1.2.4",
        "columns": {
            "Unnamed: 0": {
                "description": ""
            },
            "itid": {
                "description": ""
            },
            "id": {
                "description": ""
            },
            "request_time": {
                "description": ""
            }
        }
    },
    "expectations": [
        {
            "meta": {},
            "type": "expect_table_column_count_to_equal",
            "kwargs": {
                "value": 3
            }
        },
        {
            "meta": {},
            "type": "expect_table_columns_to_match_ordered_list",
            "kwargs": {
                "column_list": [
                    "itid",
                    "id",
                    "request_time"
                ]
            }
        }
    ]
}

```

---

<div class="post-metadata">

**Author:** ![adeola](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@adeola](https://discourse.greatexpectations.io/u/adeola)\
**Post date:** [December 4, 2024, 10:02pm UTC](https://discourse.greatexpectations.io/t/expectationsuite-from-json-file/2017/2 "2024-12-04T22:02:25Z")

</div>

You can do this by updating the `store_backend` configuration’s `base_directory` value to point to an absolute path, or a path relative to the File Data Context’s `project_root_dir`.

Directions on updating the base path of the expectation store are [here](https://docs.greatexpectations.io/docs/core/configure_project_settings/configure_metadata_stores/).

---

<div class="post-metadata">

**Author:** ![bidek56](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@bidek56](https://discourse.greatexpectations.io/u/bidek56)\
**Post date:** [December 4, 2024, 10:31pm UTC](https://discourse.greatexpectations.io/t/expectationsuite-from-json-file/2017/3 "2024-12-04T22:31:07Z")

</div>

> [@adeola](#):
>
> store\_backend

That may work for a file base store, but what if I am using

```auto
"store_backend": {
        "class_name": "InMemoryStoreBackend"
}

```

---

<div class="post-metadata">

**Author:** ![adeola](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@adeola](https://discourse.greatexpectations.io/u/adeola)\
**Post date:** [December 5, 2024, 5:20pm UTC](https://discourse.greatexpectations.io/t/expectationsuite-from-json-file/2017/4 "2024-12-05T17:20:17Z")

</div>

You can possibly try to convert it to a python dict (`my_dict = json.loads(json_str)` ) and then do `gx.ExpectationSuite(**my_dict)` though I have not yet tried this
