Skip to content

Commit f78313a

Browse files
committed
Merge remote-tracking branch 'upstream/docsp-45382-comp-cvg' into docsp-49786-meta-operator
2 parents 6db6276 + ba55cde commit f78313a

File tree

14 files changed

+87
-83
lines changed

14 files changed

+87
-83
lines changed

config/redirects

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ raw: ${prefix}/master -> ${base}/upcoming/
6161
[*-master]: ${prefix}/${version}/fundamentals/gridfs/ -> ${base}/${version}/crud/gridfs/
6262
[*-master]: ${prefix}/${version}/fundamentals/specify-query/ -> ${base}/${version}/crud/query/specify-query/
6363
[*-master]: ${prefix}/${version}/fundamentals/transactions/ -> ${base}/${version}/crud/transactions/
64-
[*-master]: ${prefix}/${version}/fundamentals/bson/ -> ${base}/${version}/data-formats/bson/
65-
[*-master]: ${prefix}/${version}/fundamentals/time-series/ -> ${base}/${version}/data-formats/time-series/
64+
[*-master]: ${prefix}/${version}/fundamentals/bson/ -> ${base}/${version}/document-formats/bson/
65+
[*-master]: ${prefix}/${version}/fundamentals/time-series/ -> ${base}/${version}/time-series/
6666
[*-master]: ${prefix}/${version}/fundamentals/logging/ -> ${base}/${version}/logging-and-monitoring/logging/
6767
[*-master]: ${prefix}/${version}/fundamentals/monitoring/ -> ${base}/${version}/logging-and-monitoring/monitoring/
6868
[*-master]: ${prefix}/${version}/fundamentals/database-collection/ -> ${base}/${version}/databases-collections/
@@ -82,10 +82,10 @@ raw: ${prefix}/master -> ${base}/upcoming/
8282
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-one/ -> ${base}/${version}/crud/update-one/
8383
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-one/arrays/ -> ${base}/${version}/crud/update-one/arrays/
8484
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-one/fields/ -> ${base}/${version}/crud/update-one/fields/
85-
[*-master]: ${prefix}/${version}/fundamentals/serialization/class-mapping/ -> ${base}/${version}/data-formats/custom-types/class-mapping/
86-
[*-master]: ${prefix}/${version}/fundamentals/serialization/poco/ -> ${base}/${version}/data-formats/custom-types/poco/
87-
[*-master]: ${prefix}/${version}/fundamentals/serialization/polymorphic-objects/ -> ${base}/${version}/data-formats/custom-types/polymorphic-objects/
88-
[*-master]: ${prefix}/${version}/fundamentals/serialization/ -> ${base}/${version}/data-formats/custom-types/serialization/
85+
[*-master]: ${prefix}/${version}/fundamentals/serialization/class-mapping/ -> ${base}/${version}/serialization/class-mapping/
86+
[*-master]: ${prefix}/${version}/fundamentals/serialization/poco/ -> ${base}/${version}/serialization/poco/
87+
[*-master]: ${prefix}/${version}/fundamentals/serialization/polymorphic-objects/ -> ${base}/${version}/serialization/polymorphic-objects/
88+
[*-master]: ${prefix}/${version}/fundamentals/serialization/ -> ${base}/${version}/serialization/
8989
[*-master]: ${prefix}/${version}/fundamentals/databases-collections/run-command/ -> ${base}/${version}/run-command/
9090
[*-master]: ${prefix}/${version}/fundamentals/authentication/ -> ${base}/${version}/security/authentication/
9191
[*-master]: ${prefix}/${version}/fundamentals/authentication/aws-iam/ -> ${base}/${version}/security/authentication/aws-iam/

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ toc_landing_pages = [
33
"/connect/connection-options",
44
"/security/authentication",
55
"/aggregation",
6-
"/aggregation/stages"
6+
"/aggregation/stages",
7+
"/serialization"
78
]
89
name = "csharp"
910
title = "C#/.NET"

source/data-formats.txt

Lines changed: 0 additions & 41 deletions
This file was deleted.

source/data-formats/custom-types.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

source/document-formats.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.. _csharp-document-formats:
2+
3+
================
4+
Document Formats
5+
================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 2
11+
:class: singlecol
12+
13+
.. facet::
14+
:name: genre
15+
:values: reference
16+
17+
.. meta::
18+
:keywords: bson, json, object, notation, read, write
19+
20+
.. toctree::
21+
:caption: Document Formats
22+
23+
BSON </document-formats/bson>
24+
Extended JSON </document-formats/extended-json>
25+
26+
Learn about using different document formats with the {+driver-short+} in the following guides:
27+
28+
- :ref:`csharp-bson`
29+
- :ref:`csharp-extended-json`

source/data-formats/bson.txt renamed to source/document-formats/bson.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ BSON Operations
66

77
.. default-domain:: mongodb
88

9+
.. meta::
10+
:keywords: document, BSON, serializer
11+
912
.. contents:: On this page
1013
:local:
1114
:backlinks: none
@@ -44,7 +47,8 @@ The code samples in this guide use the following BSON document as an example:
4447
Create a BSON Document
4548
----------------------
4649

47-
To build a BSON document in {+language+}, create an instance of the ``BsonDocument`` class.
50+
To build a representation of a BSON document in {+language+}, create an instance of the
51+
``BsonDocument`` class.
4852
The ``BsonDocument`` constructor accepts ``BsonElement`` arguments that map to the fields
4953
and values in the document. Each ``BsonElement`` can be either an instance of the
5054
``BsonElement`` class or a field-value pair inside curly braces ( ``{}`` ).
@@ -212,6 +216,22 @@ BSON document stored in ``myFile.bson``:
212216
``System.IO.Stream`` object. This means that you can read or write any location
213217
that can be accessed by a stream.
214218

219+
Read and Write Other Formats
220+
----------------------------
221+
222+
The preceding examples show how to read and write BSON data by using the
223+
``BsonBinaryReader`` and ``BsonBinaryWriter`` classes. These classes implement the
224+
``IBsonReader`` and ``IBsonWriter`` interfaces. To read and write data in other formats,
225+
the {+driver-short+} provides the following alternative implementations of the ``IBsonReader``
226+
and ``IBsonWriter`` interfaces:
227+
228+
- ``JsonReader`` and ``JsonWriter``: Read and write JSON data
229+
- ``BsonDocumentReader`` and ``BsonDocumentWriter``: Read and write BSON data
230+
contained in a ``BsonDocument`` object
231+
232+
Because these classes implement the same interfaces, you can call their methods in the same way
233+
as the preceding ``BsonBinaryReader`` and ``BsonBinaryWriter`` examples.
234+
215235
.. _csharp-bson-api:
216236

217237
API Documentation
@@ -224,3 +244,5 @@ guide, see the following API documentation:
224244
- `BsonElement <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.BsonElement.html>`__
225245
- `BsonBinaryReader <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.BsonBinaryReader.html>`__
226246
- `BsonBinaryWriter <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.BsonBinaryWriter.html>`__
247+
- `IBsonReader <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.IBsonReader.html>`__
248+
- `IBsonWriter <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.IBsonWriter.html>`__
File renamed without changes.

source/index.txt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ MongoDB C# Driver
1818
Databases & Collections </databases-collections>
1919
CRUD Operations </crud>
2020
Aggregation </aggregation>
21-
Data Formats </data-formats>
2221
Indexes </indexes>
2322
Run a Database Command </run-command>
2423
Atlas Search </atlas-search>
2524
Atlas Vector Search </atlas-vector-search>
25+
Time Series </time-series>
2626
Logging and Monitoring </logging-and-monitoring>
2727
Security </security>
28+
Serialization </serialization>
29+
Document Formats </document-formats>
2830
Integrations </integrations>
2931
Reference </reference>
3032
API Documentation <{+api-root+}>
@@ -65,12 +67,6 @@ Transform Your Data with Aggregation
6567
Learn how to use the {+driver-short+} to perform aggregation operations in the
6668
:ref:`csharp-aggregation` section.
6769

68-
Data Formats
69-
------------
70-
71-
Learn how to work with specialized data formats and custom types in the
72-
:ref:`csharp-data-formats` section.
73-
7470
Optimize Queries with Indexes
7571
-----------------------------
7672

@@ -96,6 +92,11 @@ rather than keyword matches in the
9692
`Atlas Vector Search <https://www.mongodb.com/docs/atlas/atlas-search/tutorial/>`__
9793
documentation.
9894

95+
Time Series
96+
-----------
97+
98+
Learn how to work with time series collections in the :ref:`csharp-time-series` section.
99+
99100
Logging and Monitoring
100101
----------------------
101102

@@ -108,6 +109,16 @@ Secure Your Data
108109
Learn about ways you can authenticate your application and encrypt your data in
109110
the :ref:`csharp-security` section.
110111

112+
Serialization
113+
-------------
114+
115+
Learn how to serialize and deserialize data in the :ref:`csharp-serialization` section.
116+
117+
Document Formats
118+
----------------
119+
120+
Learn about different notations you can use to read and write data in the :ref:`csharp-document-formats` section.
121+
111122
Reference
112123
---------
113124

source/data-formats/custom-types/serialization.txt renamed to source/serialization.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ Serialization
1616
:backlinks: none
1717
:depth: 2
1818
:class: singlecol
19-
19+
20+
.. toctree::
21+
:caption: Custom Types
22+
23+
Class Mapping </serialization/class-mapping>
24+
POCOs </serialization/custom-types/poco>
25+
Polymorphic Objects </serialization/polymorphic-objects>
26+
GUIDs </serialization/guids>
27+
2028
Overview
2129
--------
2230

0 commit comments

Comments
 (0)