import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
URL url = new URL("https://pr.zk.court.gov.ua/new.php");
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("POST");
httpConn.setRequestProperty("Accept", "application/json, text/javascript, */*; q=0.01");
httpConn.setRequestProperty("Accept-Language", "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7,uk;q=0.6");
httpConn.setRequestProperty("Connection", "keep-alive");
httpConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
httpConn.setRequestProperty("Cookie", "PHPSESSID=r01aaad17ju1plrc52vmdsnud1; cookiesession1=2BA3B5F54UMSLJLRCSEZPP1SESHF64B3; _ga=GA1.3.1596046659.1652640231; _gid=GA1.3.56898194.1652640231; _gat=1");
httpConn.setRequestProperty("Origin", "https://pr.zk.court.gov.ua");
httpConn.setRequestProperty("Referer", "https://pr.zk.court.gov.ua/sud0708/gromadyanam/csz/");
httpConn.setRequestProperty("Sec-Fetch-Dest", "empty");
httpConn.setRequestProperty("Sec-Fetch-Mode", "cors");
httpConn.setRequestProperty("Sec-Fetch-Site", "same-origin");
httpConn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36");
httpConn.setRequestProperty("X-Requested-With", "XMLHttpRequest");
httpConn.setRequestProperty("sec-ch-ua", "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"101\", \"Google Chrome\";v=\"101\"");
httpConn.setRequestProperty("sec-ch-ua-mobile", "?0");
httpConn.setRequestProperty("sec-ch-ua-platform", "\"Windows\"");
httpConn.setDoOutput(true);
OutputStreamWriter writer = new OutputStreamWriter(httpConn.getOutputStream());
writer.write("q_court_id=0708");
writer.flush();
writer.close();
httpConn.getOutputStream().close();
InputStream responseStream = httpConn.getResponseCode() / 100 == 2
? httpConn.getInputStream()
: httpConn.getErrorStream();
Scanner s = new Scanner(responseStream).useDelimiter("\\A");
String response = s.hasNext() ? s.next() : "";
System.out.println(response);
}
}
пользуюсь Jetbrains IntelliJ IDEA
jdk-14
Помогите я никак не могу понять как раскодировать данные результат в консоли :
[{"date":"17.05.2022 09:30","judge":"\u0427\u0435\u043f\u0443\u0440\u043d\u043e\u0432 \u0412.\u041e.