Skip to content

Commit d9717e6

Browse files
committed
Improved documentation for "Serializers"
1 parent 9526323 commit d9717e6

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

docs/serializers/bson.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# BSON
22

3+
BSON (Binary JSON) serialization is available in the .NET implementation of TypedRest.
4+
35
=== "C#"
46

57
The BSON serializer provides efficient binary serialization using [Newtonsoft.Json](https://www.newtonsoft.com/json)'s BSON support:
@@ -16,3 +18,7 @@
1618
- String enums with camel-case naming
1719
- Null values are not serialized
1820
- Automatic type name handling
21+
22+
## Content type
23+
24+
TODO: The serializer handles the `application/bson` content type.

docs/serializers/json.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,7 @@ JSON is the default serialization format in TypedRest.
101101
new URL("http://example.com/"),
102102
new MySerializer());
103103
```
104+
105+
## Content type
106+
107+
TODO: TypedRest automatically handle custom media types that end with `+json` (e.g., `application/vnd.api+json`, `application/hal+json`). These are treated as JSON and deserialized using the configured JSON serializer.

docs/serializers/xml.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# XML
22

3+
XML serialization is available in the .NET implementation of TypedRest.
4+
35
=== "C#"
6+
TODO: The XML serializer uses .NET's built-in `System.Xml.Serialization.XmlSerializer`:
7+
48
```csharp
59
var endpoint = new EntryEndpoint(
610
new Uri("http://example.com/"),
711
serializer: new XmlSerializer());
812
```
13+
14+
## Content type
15+
16+
TODO: The serializer handles the following content types:
17+
18+
- `application/xml`
19+
- `text/xml`

0 commit comments

Comments
 (0)