Node.add

Add a key-value pair to a mapping.

This method can only be called on mapping nodes.

If key and/or value is a node, it is copied to the mapping directly. Otherwise it is converted to a node and then stored in the mapping.

It is possible for the same key to be present more than once in a mapping. When emitting, all key-value pairs will be emitted. This is useful with the "!!pairs" tag, but will result in invalid YAML with "!!map" and "!!omap" tags.

  1. void add(T value)
  2. void add(K key, V value)
    struct Node
    @serdeIgnore
    void
    add
    (
    K
    V
    )
    (
    K key
    ,)

Parameters

value V

Value to add.

Meta