Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Conversation

@esfomeado
Copy link
Contributor

@esfomeado esfomeado commented Jun 23, 2022

Description

When deserializing an Activity , teamsActivity and fromStreamingConnection are created due to the method name.

If we then serialize and deserialize it again we will end up with two properties named teamsActivity and fromStreamingConnection. This can created a few issues because it will have duplicate keys when deserialized so it's no longer a valid JSON.

Specific Changes

  • Added @JsonIgnore to the isFromStreamingConnection and isTeamsActivity methods

Testing

 ObjectMapper mapper = new ObjectMapper().registerModule(new JavaTimeModule()); Activity activity1 = new Activity(); String json1 = mapper.writeValueAsString(activity1); Activity activity2 = mapper.readValue(json1, Activity.class); String json2 = mapper.writeValueAsString(activity2); 
@esfomeado esfomeado requested a review from a team as a code owner June 23, 2022 17:16
@esfomeado esfomeado closed this Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant