'Is there any difference between Map<String,Object> and Java object after json serialization?

Suppose I have an object and a map. The map has the same key-value pair as the property of the Object. I wander after json serialization, are they same? I have write some test and the result is they are same, but I'm not sure if all the cases are same.

Generally they have the following pattern.

Class ClassA{
   ClassB b;
   ClassC c;
}

Map<String,Object> map=new HashMap();
map.put("b",objectB);
map.put("c",objectC);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source