ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. * kathadris joined #java
  2. * Betal joined #java
  3. * mindCrime joined #java
  4. NeXeN it's good to have logging whether used or not, and you can simply replace slf4j with whatever you want
  5. NeXeN but yeah that does sound like something the IDE should pick up on
  6. * sweatiest joined #java
  7. * Dukorr joined #java
  8. * ChaiTRex joined #java
  9. * AMcBain joined #java
  10. * Nemu64 joined #java
  11. * rvalue- joined #java
  12. * stfstfm joined #java
  13. * metalmaniac joined #java
  14. * fed-kaczynski_ joined #java
  15. * rvalue joined #java
  16. * sa02irc joined #java
  17. * yeahitsme joined #java
  18. * Dukorr joined #java
  19. * sa02irc joined #java
  20. * Dukorr joined #java
  21. * MikeBux joined #java
  22. * Dukorr joined #java
  23. * stfstfm joined #java
  24. * julemand101 joined #java
  25. * stfstfm_ joined #java
  26. * julemand101 joined #java
  27. * jreicher joined #java
  28. * jreicher joined #java
  29. * cryosis joined #java
  30. * MikeBux joined #java
  31. * Anaphaxeton joined #java
  32. * jreicher joined #java
  33. * monkeyPlus joined #java
  34. * simon816 joined #java
  35. DynamiteDan greetings. I have been trying to use apache juneau to serialize POJOs but I am never able to compile sucessfuly even with AI help. Can anyone point me to an alternative? thanks in advance,
  36. Para ~jackson
  37. javabot Jackson is a library that provides a streaming parser for many, many common dataformats (including ~XML, ~JSON, ~YAML, ~CSV, and others) and can map those formats into and from Java Objects as well. See https://github.com/FasterXML/jackson - it's probably the most common such library in use in Java today.
  38. Para Dunno what your use case specifically is, model mappers is also a category which might be relevant.
  39. DynamiteDan I want to convert a pojo to json
  40. Para Jackson it is then.
  41. DynamiteDan without having the source. I have used gson in the past but it doesn't work as well
  42. DynamiteDan thanks :) let me try.
  43. Para None of these libraries work from source.
  44. Para But gson is also a good option. Everyone uses Jackson though, either directly or indirectly.
  45. dreamreal Jackson.
  46. dreamreal Gson is not a good option.
  47. dreamreal org.json is a TERRIBLE option.
  48. dreamreal What I'm more interested in is what led you to JUNEAU.
  49. * Nav94 joined #java
  50. * GreenResponse joined #java
  51. DynamiteDan a web search :)
  52. DynamiteDan but I am havin gproblems
  53. dreamreal yikes. Bad search responses. Jackson.
  54. dreamreal var mapper=new ObjectMapper(); var json=mapper.writeValueAsString(thing); // done
  55. DynamiteDan I am havin g problems with the mavem dependencies
  56. DynamiteDan https://www.irccloud.com/pastebin/TWE3klnv/
  57. nevet Snippet | IRCCloud
  58. Para Where's the problem?
  59. DynamiteDan package com.fasterxml.jackson.core does not exist
  60. DynamiteDan just invalidated the caches and it is working
  61. dreamreal what build system
  62. dreamreal and where
  63. dreamreal which jackson version
  64. Para the conflated Java, duh
  65. dreamreal are you doing straight copypasta or are you developing like a real person
  66. dreamreal What made you choose 2.17.2
  67. dreamreal (this is why I suspect copypasta)
  68. dreamreal 2.17.2 is fine, but the recent version is 2.22.1, which your tooling should have suggested to you
  69. dreamreal okay, it's working now, sorry, caught up, was doing errands
  70. Para Also while for testing it's fine as is, but for actual use I'd use <dependencyManagement>
  71. dreamreal most problems are problems for another day :D
  72. Para BTW I've been running claude for a bit now in a "Socratic teacher" mode and it's very neckbeardy and angry at times :D
  73. Para "No. You're wrong. Your code has bugs." is rather refreshing.
  74. Para I'm teaching myself frontend stuff and realized that it kinda works to have the LLM be the teacher. I just need to write a better agent prompt at some point first.
  75. Para I think this might be a path less traveled so the over appeasement filters are not being applied :)
  76. dreamreal That last thing is ALWAYS the case, para.
  77. * MikeBux joined #java
  78. * stfstfm joined #java
  79. DynamiteDan ok, it didn't like the class Event from pircbotx ehhe
  80. DynamiteDan the search depth was deeper than 1000
  81. Para 1) we have no idea what you're trying to do 2) it seems you're just slapping things together; you're breaking eggs hoping for an omelette
  82. Chronos I mean, if you break *enough* eggs...
  83. Para If Mythbusters was a thing, I'd want them to try this out.
  84. Para How many eggs does one need to break (and in what conditions) for an omelette to emerge.
  85. Chronos At $WORK, we're in a constant state of third party jar dependency hell. It sucks, to say the least.
  86. DynamiteDan I am jusy experiencing yes
  87. dreamreal worth noting: this has been done. By people in this channel.
  88. Chronos Especially with vulnerabilities flowing like great, mighty rivers.
  89. Chronos Constant update churn.
  90. dreamreal DynamiteDan: that's because of recursion in the data structures.
  91. Para pircbotx's Event also has direct reference to the bot object itself behind a getter, so that definitely will go nuts
  92. dreamreal DynamiteDan: speaking from... imputed experience *from this channel* I'd suggest doing a transformation from pircbotx structures into a persistable form, and using THAT.
  93. DynamiteDan yups, that is what I am doing now
  94. DynamiteDan i have a class named IRCEvent and it has a constructor with a PircBotX Event parameter
  95. DynamiteDan now I need to find out all data I need
  96. DynamiteDan now a OOP problem. Event is a base class and I am dealing with derivated classes for the events. SO I guess I need to parse every type and cast to the proper object
  97. DynamiteDan I haven't done OOP in a while
  98. dreamreal * dreamreal scans for an ownable problem and fails to find one
  99. DynamiteDan * DynamiteDan is almost sleeping
  100. * mindCrime joined #java
  101. DynamiteDan * DynamiteDan is almost sleeping
  102. DynamiteDan hmmm
  103. DynamiteDan where is a action event when you need one hehe
  104. DynamiteDan :
  105. DynamiteDan hmm
  106. DynamiteDan on the event methods I create the proper object, it is the best way
  107. * Betal joined #java
  108. * metalmaniac joined #java
  109. * iwtga joined #java
  110. * Everything joined #java
  111. * llanhmock joined #java
  112. * Ragnor joined #java
  113. * fgarcia joined #java
  114. * lockdown joined #java
  115. * sbalmos_ joined #java
  116. * rorx joined #java
  117. * mindCrime joined #java
  118. * Anaphaxeton joined #java
  119. * monkeyPlus joined #java
  120. DynamiteDan how do I signal a field not to be serialized?
  121. sonOfRa transient fields are not serialized by java serialization. If you're using other libraries to serialize (jackson for example), you may have to be more careful
  122. sonOfRa iirc a transient field is not serialized, but if it has a public getter, it *will* be serialized through the getter, unless you configure your mapper not to do so
  123. DynamiteDan oh... so much to learn again
  124. * marcel joined #java
  125. * johnjay joined #java
  126. * iwtga1 joined #java
  127. * hiredman joined #java