[jackson-user] Re: convertValue ignore anySetter/anyGettter

2023-08-12 Thread 김주혁
 

Hello Ken,

To make things clear, a few questions.

   - Meaning of "to strip any additional properties before writing an 
   object". Are you looking to exclude `additionalProperties` only during 
   serialization, but include in deserialization? 
   - Is the primary intent to generate a JSON output that does not include 
   `additionalProperties`, or is there another objective? 
   - Could you also provide a simple, reproducible example using just 
   Jackson and Java?
   
Thanks,

Joo Hyuk, Kim (Vince)
On Saturday, August 12, 2023 at 1:31:13 AM UTC+9 Ken Hancock wrote:

>
> I have a pojo that serializes any additional properties into 
>
> @JsonAnyGetter
> public Map getAdditionalProperties() {
> return this.additionalProperties;
> }
>
> @JsonAnySetter
> public void setAdditionalProperty(String name, Object value) {
> this.additionalProperties.put(name, value);
> }
>
> However, I have an odd use case where I want to be able to strip any 
> additional properties before writing an object. I'm fairly sure with all of 
> Jackson's configuration settings that I should be able to configure a 
> mapper such that mapper.convertValue(myPojo, MyPojo.class) should be able 
> to serialize and deserialize back again, dropping the additionalProperties 
> when it serializes?   The pojo is deeply nested and auto-generated, so I'd 
> prefer not to hard-code having to just clear additionalProperties at each 
> sub-object.
>
> Thanks,
>
> Ken
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/bd3991ff-0120-4a10-a5d7-6e03e6e3a6d7n%40googlegroups.com.


Re: [jackson-user] Re: Java version error with doubleparser class on java 1.8 with latest release

2023-08-12 Thread Joo Hyuk Kim
No problem! Hope u get it fixed

2023년 8월 12일 (토) 오전 1:16, 'jason...@fico.com' via jackson-user <
jackson-user@googlegroups.com>님이 작성:

> I am building from the command line, thank you for checking on this and
> confirming that it's just an issue with my local setup.
>
> On Friday, August 11, 2023 at 2:23:16 AM UTC-6 Joo Hyuk Kim (김주혁) wrote:
>
>> Did you build using an IDE? What was its configured the runtime/compiler
>> version?
>> Build errors with such message  mostly comes from an IDE.
>> If IntelliJ menu is at [ File -> Project Structure -> Project Settings ->
>> SDK ].
>>
>> Just for a reference, I just pulled latest jackson-core:2.15 version and
>> built.
>>
>> [image: Untitled 2.jpg]
>> On Friday, August 11, 2023 at 4:50:59 PM UTC+9 jason...@fico.com wrote:
>>
>>> My project is stuck on java 1.8, I cannot change that. I need to update
>>> our version of jackson in order to keep up with security issues, but the
>>> latest version, jackson-core-2.15.2, causes an error when I go to build the
>>> application:
>>>
>>> [image: jackson-core build error.png]
>>>
>>> I know the error means that the class file, FastDoubleSwar.class, is
>>> compiled for java 17 while my project is on 1.8. But the MANIFEST.MF in the
>>> jackson-core jar implies that the jar is compiled/built for java 1.8. I
>>> believe this issue is because the FastDoubleParser library is being pulled
>>> into the jackson-core jar (see line 189 of the pom
>>> 
>>> ).
>>>
>>> Can someone confirm this is the case? If it is the case then I imagine
>>> anyone on *any older version* of Java would run into this issue on
>>> 2.15.2, but the fact that this jar has been released for a while now and no
>>> one (that I can find) has raised this issue makes me think it's some weird
>>> configuration issue with my project.
>>>
>>> Thanks,
>>> ~Jason
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jackson-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jackson-user/4fd6aeb1-9a9f-44e6-bc99-50c439c0d684n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CALS-ipy0PhGg-AQn94SZeARzDUeB6NSj0CQHS0FdKTvMfZuHvw%40mail.gmail.com.