0

I tried this and run as Java application:

`String data = "{\"eidaID\":\"حسنss\"}"; JSONObject obj = new 
JSONObject(data);`
      
System.out.println(obj.get("eidaID").toString());
O/p => حسنss

But, when it comes from the request in the spring boot application in the same manner, System.out.println("Key= :"+key+" with value= "+jsonObject.get(key).toString()+" is present");

and run as spring boot app. There, it comes as ?????

Can anyone please help here?

  • Do not use System.out. Prefer saving to file. If you want to use console/shell/terminal, check that it is UTF-8 compatible (and you have the correct fonts). You get here on stackoverflow a lot of question (and answer) on how to get a UTF-8 shell. But my take: save to file and read it from a file, and you gain productivity. – Giacomo Catenazzi Nov 18 '21 at 14:03
  • Will logger.info work and saving into a file – Shubham Jain Nov 18 '21 at 14:11

0 Answers0