google / google/gson

Problem Serialize De-serialize: List of Objects that contain Abstract types !

Open
#529 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

```
What steps will reproduce the problem?
1. classes Animals, Dog extends Animals, Cat extends Animals,
Box (with two fields Animals, String)

2. Create a list with Boxes and add Boxes with Dogs and Cats

3. Serialize and De-serialize and view the list

What is the expected output? What do you see instead?
Expected: A list with boxes with dogs and cats.
Instead: A list with boxes with animals.

What version of the product are you using? On what operating system?
Gson 2.2.4, Linux Mint 13 Maya

Please provide any additional information below.

```

Original issue reported on code.google.com by `totolici...@gmail.com` on 9 Aug 2013 at 7:42

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.