File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,26 @@ app.UseServiceStack(new AppHost(), options => {
1313});
1414```
1515
16+ ### Configure System.Text.Json APIs
17+
18+ You can configure when to use System.Text.Json for APIs when registering to use Endpoint Routing:
19+
20+ ``` csharp
21+ app .UseServiceStack (new AppHost (), options => {
22+ // Use for Serialization and Deserialization of JSON APIs (default)
23+ options .MapEndpoints (useSystemJson :UseSystemJson .Always );
24+
25+ // Use only for deserializing API Requests
26+ options .MapEndpoints (useSystemJson :UseSystemJson .Request );
27+
28+ // Use only for serializing API Responses
29+ options .MapEndpoints (useSystemJson :UseSystemJson .Response );
30+
31+ // Don't use System.Text.Json for APIs
32+ options .MapEndpoints (useSystemJson :UseSystemJson .Never );
33+ });
34+ ```
35+
1636### Enhanced System.Text.Json
1737
1838To improve compatibility with existing ServiceStack DTOs using ServiceStack.Text [ JSON Serializer] ( /json-format ) and
You can’t perform that action at this time.
0 commit comments