question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

id not deserialized when using interface as collection class

See original GitHub issue

When using a hierarchy where the `id field is defined in an interface, this field is not deserialized properly, it seems. I’ve placed a minimal example exhibiting this behavior here. This example gives the following output:

first id: 5b46541ae646ea1621fe1b72, second id: 5b46541ae646ea1621fe1b73

I would of course expect these ids to be identical. They are both different from the id as stored in the database. Am I missing something, or have I triggered a bug?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zigzagocommented, Jul 11, 2018

This is a bug, fixed now in 3.8.1-SNAPSHOT. Thank you.

0reactions
michelwilsoncommented, Jul 13, 2018

So far so good, it works like a charm! Thanks again 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How to deserialize collection of interfaces when concrete ...
I am currently facing the situation where I get a json file that I can't modify and I want the resulting deserialized class...
Read more >
Deserializing an interface with Jackson | Andrew Tarry
Using Java and json together can make it hard to manage deserialisation correctly when using interfaces. Here we show the solution to 3...
Read more >
Serializing and Deserializing a List with Gson - Baeldung
One common use case is to serialize and deserialize a list of POJOs. Consider the class: public class MyClass { private int id; ......
Read more >
How to serialize and deserialize JSON using C# - .NET
Use the library directly, not through a framework such as ASP.NET Core. Use the JsonSerializer class with custom types to serialize from and ......
Read more >
Serialization in Java - DigitalOcean
If you are working with any IDE, you will automatically get a warning that “The serializable class Employee does not declare a static...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found