Skip to content

Commit 42ee601

Browse files
committed
Update README.md
1 parent 88240f7 commit 42ee601

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ python-benedict is a dict subclass with **keylist/keypath/keyattr** support, **I
4040
- [Disable keypath functionality](#disable-keypath-functionality)
4141
- [List index support](#list-index-support)
4242
- [I/O](#io)
43+
- [Data validation using Pydantic models](#data-validation-using-pydantic-models)
4344
- [API](#api)
4445
- [Utility methods](#utility-methods)
4546
- [I/O methods](#io-methods)
@@ -280,9 +281,7 @@ Here are the details of the supported formats, operations and extra options docs
280281
| `xml` | :white_check_mark: | :white_check_mark: | [xmltodict](https://github.com/martinblech/xmltodict) |
281282
| `yaml` | :white_check_mark: | :white_check_mark: | [PyYAML](https://pyyaml.org/wiki/PyYAMLDocumentation) |
282283

283-
#### Data validation
284-
285-
`benedict` supports data validation using `Pydantic` models.
284+
#### Data validation using Pydantic models
286285

287286
This feature **requires** the `validate` extra to be installed:
288287

@@ -292,18 +291,18 @@ pip install "python-benedict[validate]"
292291

293292
You can validate data in different ways:
294293

295-
##### Using the `validate` method directly
294+
1. Using the `validate` method directly
296295
```python
297296
d = benedict(my_data)
298297
d.validate(schema=MySchema)
299298
```
300299

301-
##### Using the `schema` parameter during initialization
300+
2. Using the `schema` parameter during initialization
302301
```python
303302
d = benedict(my_data, schema=MySchema)
304303
```
305304

306-
##### Using the `schema` parameter with any `from_{format}` method
305+
3. Using the `schema` parameter with any `from_{format}` method
307306
```python
308307
d = benedict.from_json(my_data, schema=MySchema)
309308
```

0 commit comments

Comments
 (0)