File file = new File(パス); //ファイルを読み取る ObjectMapper mapper = new ObjectMapper(); JsonNode root = mapper.readTree(file); //特定のデータを抽出する為にJsonNode型に変換する int status = root.get("status").intValue(); //jsonファイルのkey:statusのvalueをint型で取得する
Register as a new user and use Qiita more conveniently