# Object nodes

[Object nodes](https://github.com/vostok/configuration.abstractions/blob/master/Vostok.Configuration.Abstractions/SettingsTree/ObjectNode.cs) are containers used to represent objects with named fields/properties. Each object node contains a map of child nodes with their names as keys. There is no limit to nesting: objects can contain other objects and arrays. Elements of an object are required to have non-null names.

Object nodes are typically mapped to arbitrary classes and structs during [binding](https://vostok.gitbook.io/configuration/concepts-and-basics/binding-nodes-to-models).

### Properties

| roperty         | Description                                                                                                                                          |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name`          | Required if nested in an [object node](https://vostok.gitbook.io/configuration/concepts-and-basics/settings-nodes/object-nodes), optional otherwise. |
| `Value`         | Always returns `null`. Only [value nodes](https://vostok.gitbook.io/configuration/concepts-and-basics/settings-nodes/value-nodes) can have values.   |
| `Children`      | Returns an unordered sequence of child nodes.                                                                                                        |
| `ChildrenCount` | Returns the number of elements in the `Children` sequence.                                                                                           |
| `this[name]`    | Returns a child node with given name or `null` if such a node does not exist.                                                                        |

### Equality

Two object nodes are considered equal if their `Children` sequences are equivalent (contain equal elements but may present different order) and their names match up to differences in case.

### Representation

```
Object(Value("A", "1"), Value("B", "2")) --> { "A": "1", "B": "2" }
```

### Related pages

{% content-ref url="" %}
[](https://vostok.gitbook.io/configuration/concepts-and-basics/settings-nodes)
{% endcontent-ref %}

{% content-ref url="../settings-nodes-scoping" %}
[settings-nodes-scoping](https://vostok.gitbook.io/configuration/concepts-and-basics/settings-nodes-scoping)
{% endcontent-ref %}

{% content-ref url="../settings-nodes-merging" %}
[settings-nodes-merging](https://vostok.gitbook.io/configuration/concepts-and-basics/settings-nodes-merging)
{% endcontent-ref %}
