Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xml/System.Text.Json.Serialization/ReferenceHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@

* For the metadata properties within the JSON to be considered well-formed, they must follow these rules:

* The `$id` metadata property must be the first property in the JSON object.
* Unless <xref:System.Text.Json.JsonSerializerOptions.AllowOutOfOrderMetadataProperties> is set to `true`, the `$id` metadata property must be the first property in the JSON object.
* A JSON object that contains a `$ref` metadata property must not contain any other properties.
* The value of the `$ref` metadata property must refer to an `$id` that has appeared earlier in the JSON.
* The value of the `$id` and `$ref` metadata properties must be a JSON string.
* For enumerable types, such as <xref:System.Collections.Generic.List%601>, the JSON array must be nested within a JSON object containing an `$id` and `$values` metadata property, in that order.
* For enumerable types, such as <xref:System.Collections.Generic.List%601>, the JSON array must be nested within a JSON object containing an `$id` and `$values` metadata property, in that order. (However, the order is not important if <xref:System.Text.Json.JsonSerializerOptions.AllowOutOfOrderMetadataProperties> is set to `true`.)
* For enumerable types, the `$values` metadata property must be a JSON array.
* The `$values` metadata property is only valid when referring to enumerable types.

Expand Down