-
-
Notifications
You must be signed in to change notification settings - Fork 823
Description
Existing method JsonGenerator.writeObject() (and related writeObjectField()) is misnamed since Object otherwise refers to Object (JSON) values, but this method is for writing Java Objects (POJOs) -- which often end up as Object values but do not have to. Elsewhere in Jackson (f.ex in Tree Model) this difference is indicate properly.
So: let's add writePOJO() (and writePOJOField()) in 2.13 (and perhaps deprecate later in 2.14 or so): in 3.0 we can then remove old methods and only keep new ones.
NOTE: writeObjectFieldStart(), writeObjectId() and writeObjectRef() should remain as-is since the naming is less confusing (first method actually refers to data-level Object Value; and for other 2 Id/Ref make it clear these must be for Object entities).