Click here to Skip to main content
15,501,180 members
Home / Discussions / Java
   

Java

 
AnswerRe: JAVA IF ELSE STATEMENT (HELP ME) Pin
Sandeep Mewara24-Oct-20 9:17
mveSandeep Mewara24-Oct-20 9:17 
GeneralRe: JAVA IF ELSE STATEMENT (HELP ME) Pin
tomatomoa3-Nov-20 3:18
Membertomatomoa3-Nov-20 3:18 
GeneralRe: JAVA IF ELSE STATEMENT (HELP ME) Pin
Richard MacCutchan3-Nov-20 4:11
mveRichard MacCutchan3-Nov-20 4:11 
QuestionLooking for a node.js developer for advanced disk wiping software (Almost complete) Pin
fixapc22-Oct-20 6:45
Memberfixapc22-Oct-20 6:45 
AnswerRe: Looking for a node.js developer for advanced disk wiping software (Almost complete) Pin
Richard MacCutchan22-Oct-20 7:09
mveRichard MacCutchan22-Oct-20 7:09 
QuestionLog4j2 Migration Pin
Member 1496731916-Oct-20 5:21
MemberMember 1496731916-Oct-20 5:21 
AnswerRe: Log4j2 Migration Pin
Richard MacCutchan16-Oct-20 5:38
mveRichard MacCutchan16-Oct-20 5:38 
QuestionJackson ObjectMapper valueToTree method also write valueType and integral but no actual value Pin
Manish K. Agarwal12-Oct-20 0:02
MemberManish K. Agarwal12-Oct-20 0:02 
I am trying to convert a JAVA POJO object with a JsonObject to a String as following:

class MyPojo {
   public MyPojo(String sName, JsonObject obj)
   {
      this.sName = sName;
      this.tJsonObj = obj;
   }
   public String sName;
   public javax.json.JsonObject tJsonObj;
};

 javax.json.JsonObject jsonObj = JsonUtils.toJsonObject("{\"key\": 123}");
 ObjectMapper mapper = new com.fasterxml.jackson.databind.ObjectMapper.ObjectMapper();
 JsonNode node = mapper.valueToTree(new MyPojo("myname", jsonObj));
 String jsonStr = node.toString();


I am getting jsonStr value as:
{"sName":"myname","tJsonObj":{"key":{"integral":true,"valueType":"NUMBER"}}}

How can I get jsonStr value as:
{"sName":"myname","tJsonObj":{"key":123}}

JsonUtils.toJsonObject is my own utility method to get JsonObject from String.
QuestionWhy can't we make a sign up with phone number in android studio project Pin
Member 145474583-Oct-20 3:46
MemberMember 145474583-Oct-20 3:46 
Question2d java graphics Pin
Member 149532531-Oct-20 3:07
MemberMember 149532531-Oct-20 3:07 
AnswerRe: 2d java graphics Pin
CHill601-Oct-20 3:09
mveCHill601-Oct-20 3:09 
AnswerRe: 2d java graphics Pin
Richard MacCutchan1-Oct-20 4:02
mveRichard MacCutchan1-Oct-20 4:02 
Questionjava programmimg Pin
Member 1494135617-Sep-20 20:36
MemberMember 1494135617-Sep-20 20:36 
AnswerRe: java programmimg Pin
Member 1494135617-Sep-20 20:39
MemberMember 1494135617-Sep-20 20:39 
AnswerRe: java programmimg Pin
Sandeep Mewara17-Sep-20 21:23
mveSandeep Mewara17-Sep-20 21:23 
AnswerRe: java programmimg Pin
Gerry Schmitz18-Sep-20 1:44
mveGerry Schmitz18-Sep-20 1:44 
GeneralRe: java programmimg Pin
Dave Kreskowiak18-Sep-20 5:33
mveDave Kreskowiak18-Sep-20 5:33 
QuestionIntegrating keycloak with spring security Pin
arunken16-Sep-20 22:30
Memberarunken16-Sep-20 22:30 
QuestionHelp me! Pin
Member 1492738231-Aug-20 9:30
MemberMember 1492738231-Aug-20 9:30 
AnswerRe: Help me! Pin
ZurdoDev31-Aug-20 10:37
professionalZurdoDev31-Aug-20 10:37 
AnswerRe: Help me! Pin
ZurdoDev31-Aug-20 10:38
professionalZurdoDev31-Aug-20 10:38 
AnswerRe: Help me! Pin
Afzaal Ahmad Zeeshan31-Aug-20 18:52
mveAfzaal Ahmad Zeeshan31-Aug-20 18:52 
AnswerRe: Help me! Pin
Richard MacCutchan31-Aug-20 22:11
mveRichard MacCutchan31-Aug-20 22:11 
QuestionHow can I solve the following error: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext; Pin
Member 1469623621-Jul-20 19:41
MemberMember 1469623621-Jul-20 19:41 
AnswerRe: How can I solve the following error: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext; Pin
Richard MacCutchan21-Jul-20 22:41
mveRichard MacCutchan21-Jul-20 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.