Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/333.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 为什么每个字符都与空'\00';使用JSON.Net的字符_C#_.net_Json_Serialization_Json.net - Fatal编程技术网

C# 为什么每个字符都与空'\00';使用JSON.Net的字符

C# 为什么每个字符都与空'\00';使用JSON.Net的字符,c#,.net,json,serialization,json.net,C#,.net,Json,Serialization,Json.net,在使用十六进制编辑器查看json文件时,我发现在每个字符后面都附加了额外的空字符,这是为什么呢? 有没有什么方法可以让我忽略多余的空字符,因为我在IO、文件大小上浪费了几乎两倍的时间 下面是我在hex编辑器中打开json文件时得到的示例十六进制代码: 7b 00 22 00 43 00 6c 00 69 00 65 00 6e 00 74 00 54 00 6f 00 6b 00 65 00 6e 00 22 00 3a 00 22 00 5a 00 34 00 47 00 6c 00 5a 0

在使用十六进制编辑器查看json文件时,我发现在每个字符后面都附加了额外的空字符,这是为什么呢? 有没有什么方法可以让我忽略多余的空字符,因为我在IO、文件大小上浪费了几乎两倍的时间

下面是我在hex编辑器中打开json文件时得到的示例十六进制代码:

7b 00 22 00 43 00 6c 00 69 00 65 00 6e 00 74 00 54 00 6f 00 6b 00 65 00 6e 00 22 00 3a 00 22 00 5a 00 34 00 47 00 6c 00 5a 00 31 00 4d 00 5a 00
43 00 6c 00 72 00 49 00 6a 00 78 00 41 00 33 00

您使用了Unicode流。请确保使用UTF-8