@@ -653,7 +653,7 @@ public ObjectNode retain(String... fieldNames) {
653653
654654 /**
655655 * Method that will construct an ArrayNode and add it as a
656- * field of this ObjectNode, replacing old value, if any.
656+ * property of this {@code ObjectNode} , replacing old value, if any.
657657 *<p>
658658 * <b>NOTE</b>: Unlike all <b>put(...)</b> methods, return value
659659 * is <b>NOT</b> this <code>ObjectNode</code>, but the
@@ -662,16 +662,16 @@ public ObjectNode retain(String... fieldNames) {
662662 * @return Newly constructed ArrayNode (NOT the old value,
663663 * which could be of any type)
664664 */
665- public ArrayNode putArray (String fieldName )
665+ public ArrayNode putArray (String propertyName )
666666 {
667667 ArrayNode n = arrayNode ();
668- _put (fieldName , n );
668+ _put (propertyName , n );
669669 return n ;
670670 }
671671
672672 /**
673673 * Method that will construct an ObjectNode and add it as a
674- * field of this ObjectNode, replacing old value, if any.
674+ * property of this {@code ObjectNode} , replacing old value, if any.
675675 *<p>
676676 * <b>NOTE</b>: Unlike all <b>put(...)</b> methods, return value
677677 * is <b>NOT</b> this <code>ObjectNode</code>, but the
@@ -680,29 +680,44 @@ public ArrayNode putArray(String fieldName)
680680 * @return Newly constructed ObjectNode (NOT the old value,
681681 * which could be of any type)
682682 */
683- public ObjectNode putObject (String fieldName )
683+ public ObjectNode putObject (String propertyName )
684684 {
685685 ObjectNode n = objectNode ();
686- _put (fieldName , n );
686+ _put (propertyName , n );
687687 return n ;
688688 }
689689
690690 /**
691- * @return This node (to allow chaining)
691+ * Method for adding an opaque Java value as the value of specified property.
692+ * Value can be serialized like any other property, as long as Jackson can
693+ * serialize it. Despite term "POJO" this allows use of about any Java type, including
694+ * {@link java.util.Map}s, {@link java.util.Collection}s, as well as Beans (POJOs),
695+ * primitives/wrappers and even {@link JsonNode}s.
696+ * Method is most commonly useful when composing content to serialize from heterogenous
697+ * sources.
698+ *<p>
699+ * NOTE: if using {@link JsonNode#toString()} (or {@link JsonNode#toPrettyString()}
700+ * support for serialization may be more limited, compared to serializing node
701+ * with specifically configured {@link ObjectMapper}.
702+ *
703+ * @param propertyName Name of property to set.
704+ * @param pojo Java value to set as the property value
705+ *
706+ * @return This {@code ObjectNode} (to allow chaining)
692707 */
693- public ObjectNode putPOJO (String fieldName , Object pojo ) {
694- return _put (fieldName , pojoNode (pojo ));
708+ public ObjectNode putPOJO (String propertyName , Object pojo ) {
709+ return _put (propertyName , pojoNode (pojo ));
695710 }
696711
697712 /**
698713 * @since 2.6
699714 */
700- public ObjectNode putRawValue (String fieldName , RawValue raw ) {
701- return _put (fieldName , rawValueNode (raw ));
715+ public ObjectNode putRawValue (String propertyName , RawValue raw ) {
716+ return _put (propertyName , rawValueNode (raw ));
702717 }
703718
704719 /**
705- * @return This node (to allow chaining)
720+ * @return This {@code ObjectNode} (to allow chaining)
706721 */
707722 public ObjectNode putNull (String fieldName )
708723 {
0 commit comments