We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a31c1d3 commit 3ee1046Copy full SHA for 3ee1046
README.md
@@ -13,7 +13,7 @@ import org.everit.jsonvalidator.loader.SchemaLoader;
13
import org.json.JSONObject;
14
import org.json.JSONTokener;
15
// ...
16
-JSONObject rawSchema = new JSONObject(new JSONTokener(Main.class.getResourceAsStream("/path/to/your/schema.json")));
+JSONObject rawSchema = new JSONObject(new JSONTokener(getClass().getResourceAsStream("/path/to/your/schema.json")));
17
Schema schema = SchemaLoader.load(rawSchema);
18
schema.validate(new JSONObject("{\"hello\" : \"world\"}")); // throws a ValidationException if this object is invalid
19
```
0 commit comments