Here you can find the source of loadJSON(Path path)
public static JsonNode loadJSON(Path path) throws JsonProcessingException, IOException
//package com.java2s; import java.io.IOException; import java.io.Reader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; public class Main { private static final ObjectMapper JSON_MAPPER = new ObjectMapper(); public static JsonNode loadJSON(Path path) throws JsonProcessingException, IOException { try (final Reader input = Files.newBufferedReader(path, StandardCharsets.UTF_8);) { return loadJSON(input); }//from ww w . jav a 2s . c o m } public static JsonNode loadJSON(Reader input) throws JsonProcessingException, IOException { return JSON_MAPPER.readTree(input); } }