You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,13 @@ You want to load a `package.json` file and interact with it as a struct.
32
32
Add this line to the `[dependencies]` section of your `Cargo.toml`:
33
33
34
34
```toml
35
-
package_json_schema = "0.2.0"
35
+
package_json_schema = "0.2.1"
36
36
```
37
37
38
38
If you would like to include validation then add the `validate` feature.
39
39
40
40
```toml
41
-
package_json_schema = { version = "0.2.0", features = ["validate"] }
41
+
package_json_schema = { version = "0.2.1", features = ["validate"] }
42
42
```
43
43
44
44
This adds the `validator` crate as a dependency and adds the `.validate()` method to the `PackageJson` struct. The fields are validated according to the [JSON schema specification](https://json.schemastore.org/package.json).
@@ -55,7 +55,7 @@ use package_json_schema::PackageJson;
This crate leaves it to the user to load the `package.json` content from the filesystem. Here is an example of loading the file contents and parsing the contents into a struct.
@@ -109,7 +109,7 @@ assert_eq!(
109
109
To validate the `package.json` fields, enable the `validate` feature.
110
110
111
111
```toml
112
-
package_json_schema = { version = "0.2.0", features = ["validate"] }
112
+
package_json_schema = { version = "0.2.1", features = ["validate"] }
0 commit comments