55 references to SerializeToUtf8Bytes
BasketService (1)
BasketService.cs (1)
87body: JsonSerializer.SerializeToUtf8Bytes(order));
BicepSample.ApiService (1)
Program.cs (1)
104await database.ListRightPushAsync("entries", JsonSerializer.SerializeToUtf8Bytes(entry));
CdkSample.ApiService (1)
Program.cs (1)
67await database.ListRightPushAsync("entries", JsonSerializer.SerializeToUtf8Bytes(entry));
Microsoft.AspNetCore.Components (1)
PersistentComponentState.cs (1)
87_currentState.Add(key, JsonSerializer.SerializeToUtf8Bytes(instance, JsonSerializerOptionsProvider.Options));
Microsoft.AspNetCore.Components.Endpoints (4)
DependencyInjection\ServerComponentSerializer.cs (1)
44var serializedServerComponentBytes = JsonSerializer.SerializeToUtf8Bytes(serverComponent, ServerComponentSerializationSettings.JsonSerializationOptions);
DependencyInjection\WebAssemblyComponentSerializer.cs (2)
19var serializedDefinitions = Convert.ToBase64String(JsonSerializer.SerializeToUtf8Bytes(definitions, WebAssemblyComponentSerializationSettings.JsonSerializationOptions)); 20var serializedValues = Convert.ToBase64String(JsonSerializer.SerializeToUtf8Bytes(values, WebAssemblyComponentSerializationSettings.JsonSerializationOptions));
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
53JsonSerializer.SerializeToUtf8Bytes(state);
Microsoft.AspNetCore.Components.Server (1)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
53JsonSerializer.SerializeToUtf8Bytes(state);
Microsoft.AspNetCore.Components.Tests (5)
Lifetime\ComponentApplicationStateTest.cs (4)
17["MyState"] = JsonSerializer.SerializeToUtf8Bytes(new byte[] { 1, 2, 3, 4 }) 51["MyState"] = JsonSerializer.SerializeToUtf8Bytes(new byte[] { 1, 2, 3, 4 }) 141var serialized = JsonSerializer.SerializeToUtf8Bytes(myState); 159var serialized = JsonSerializer.SerializeToUtf8Bytes<byte[]>(null);
Lifetime\ComponentStatePersistenceManagerTest.cs (1)
25["MyState"] = JsonSerializer.SerializeToUtf8Bytes(data)
Microsoft.AspNetCore.Components.Web.Tests (12)
WebEventData\ChangeEventArgsReaderTest.cs (1)
65var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\ClipboardEventArgsReaderTest.cs (1)
29var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\DragEventArgsReaderTest.cs (1)
83var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\ErrorEventArgsReaderTest.cs (1)
38var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\FocusEventArgsReaderTest.cs (1)
30var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\KeyboardEventArgsReaderTest.cs (1)
48var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\MouseEventArgsReaderTest.cs (1)
68var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\PointerEventArgsReaderTest.cs (1)
60var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\ProgressEventArgsReaderTest.cs (1)
35var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\TouchEventArgsReaderTest.cs (1)
113var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\WebEventDescriptorReaderTest.cs (1)
67var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
WebEventData\WheelEventArgsReaderTest.cs (1)
53var json = JsonSerializer.SerializeToUtf8Bytes(args, JsonSerializerOptionsProvider.Options);
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
53JsonSerializer.SerializeToUtf8Bytes(state);
Microsoft.AspNetCore.Http.Extensions.Tests (16)
RequestDelegateFactoryTests.cs (2)
850var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(originalTodo); 2875var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new object());
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
225var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(requestData);
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (5)
624var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new string[] { "ValueFromBody" }); 651var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new string[] { "ValueFromBody" }); 678var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new string[] { "ValueFromBody" }); 705var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new string[] { "ValueFromBody" }); 732var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new string[] { "ValueFromBody" });
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (2)
211var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(originalTodo); 267var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(originalTodo);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (6)
88var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(requestData); 227var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new 268var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new 309var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new 350var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(new 429var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(targetStruct);
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
225var requestBodyBytes = JsonSerializer.SerializeToUtf8Bytes(requestData);
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\DownloadPersonalData.cshtml.cs (1)
78return new FileContentResult(JsonSerializer.SerializeToUtf8Bytes(personalData), "application/json");
Areas\Identity\Pages\V5\Account\Manage\DownloadPersonalData.cshtml.cs (1)
78return new FileContentResult(JsonSerializer.SerializeToUtf8Bytes(personalData), "application/json");
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
ProtectedPrerenderComponentApplicationStateTest.cs (2)
45var persistedState = Convert.ToBase64String(_protector.Protect(JsonSerializer.SerializeToUtf8Bytes(expectedState))); 66var persistedState = Convert.ToBase64String(JsonSerializer.SerializeToUtf8Bytes(expectedState));
System.Memory.Data (1)
System\BinaryData.cs (1)
397=> new BinaryData(JsonSerializer.SerializeToUtf8Bytes(jsonSerializable, options), MediaTypeApplicationJson);
System.Text.Json (1)
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (1)
25/// encoding since the implementation internally uses UTF-8. See also <see cref="SerializeToUtf8Bytes{TValue}(TValue, JsonSerializerOptions?)"/>
System.Windows.Forms (1)
System\Windows\Forms\OLE\DataObject.cs (1)
173: new JsonData<T>() { JsonBytes = JsonSerializer.SerializeToUtf8Bytes(data) };
System.Windows.Forms.Tests (4)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
39JsonBytes = JsonSerializer.SerializeToUtf8Bytes(testData) 61JsonBytes = JsonSerializer.SerializeToUtf8Bytes(testData)
System\Windows\Forms\ClipboardTests.cs (2)
1073byte[] serialized = JsonSerializer.SerializeToUtf8Bytes(font); 1148_formatToJson.Add(format, JsonSerializer.SerializeToUtf8Bytes(data));