I am migrating from snakeyaml and a feature snakeyaml had is that it automatically wrote the object type in the output YAML so that deserialization would be transparent and easy. I cannot seem to find the same feature in Jackson Databind.

If I merely specify Object.class, I get a LinkedHashMap which is to be expected. Additionally, for this to work, I would have to see the class type in the JSON and I haven't found a native way to do that.

Is this required?