I\'m using Spring Boot and json-schema-validator. I\'m trying to read a file called jsonschema.json from the resources folder. I\'ve t
json-schema-validator
jsonschema.json
resources
Below is my working code.
List list = new ArrayList<>(); File file = new ClassPathResource("json/test.json").getFile(); ObjectMapper objectMapper = new ObjectMapper(); sampleObject = Arrays.asList(objectMapper.readValue(file, sampleObject[].class));
Hope it helps one!