使用json.net反序列化c#中的json对象,读取/转换时出错

使用json.net反序列化c#中的json对象,读取/转换时出错,c#,json,json.net,deserialization,C#,Json,Json.net,Deserialization,我正在从json文件反序列化,该文件包含以下字段: { 'IdTechnician': '4', 'DescTechnician': 'Surname Name', 'LoginTechnician': 'username', 'TypeTechnician': '1', 'TelephoneTechnician': '+123456789', 'SignatureTechnician': '????\\u0000\\u0010JFIF\\u0000\\u0

我正在从json文件反序列化,该文件包含以下字段:

 {    'IdTechnician': '4',    'DescTechnician': 'Surname Name',    'LoginTechnician': 'username',    'TypeTechnician': '1',    'TelephoneTechnician': '+123456789',    'SignatureTechnician': '????\\u0000\\u0010JFIF\\u0000\\u0001\\u0002\\u0001\\u0001,\\u0001,\\u0000\\u0000??\\u0000\\u000eAdobe\\u0000d\\u0000\\u0000\\u0000\\u0000\\u0001??\\t?Exif\\u0000\\u0000MM\\u0000*\\u0000\\u0000\\u0000\\b\\u0000\\u0007\\u0001\\u0012\\u0000\\u0003\\u0000\\u0000\\u0000\\u0001\\u0000\\u0001\\u0000\\u0000\\u0001\\u001a\\u0000\\u0005\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000b\\u0001\\u001b\\u0000\\u0005\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000j\\u0001(\\u0000\\u0003\\u0000\\u0000\\u0000\\u0001\\u0000\\u0002\\u0000\\u0000\\u00011\\u0000\\u0002\\u0000\\u0000\\u0000\\u001c\\u0000\\u0000\\u0000r\\u00012\\u0000\\u0002\\u0000\\u0000\\u0000\\u0014\\u0000\\u0000\\u0000??i\\u0000\\u0004\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000?\\u0000\\u0000\\u0000?\\u0001,\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0001,\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000Adobe Photoshop CS4 Windows\\u00002011:03:09 17:10:23\\u0000\\u0000\\u0003?\\u0001\\u0000\\u0003\\u0000\\u0000\\u0000\\u0001??\\u0000\\u0000?\\u0002\\u0000\\u0004\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000??\\u0003\\u0000\\u0004\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000-\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0006\\u0001\\u0003\\u0000\\u0003\\u0000\\u0000\\u0000\\u0001\\u0000\\u0006\\u0000\\u0000\\u0001\\u001a\\u0000\\u0005\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0001\\u001c\\u0001\\u001b\\u0000\\u0005\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0001$\\u0001(\\u0000\\u0003\\u0000\\u0000\\u0000\\u0001\\u0000\\u0002\\u0000\\u0000\\u0002\\u0001\\u0000\\u0004\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0001,\\u0002\\u0002\\u0000\\u0004\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\b^\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000H\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000H\\u0000\\u0000\\u0000\\u0001????\\u0000\\u0010JFIF\\u0000\\u0001\\u0002\\u0000\\u0000H\\u0000H\\u0000\\u0000??\\u0000\\fAdobe_CM\\u0000\\u0002??\\u0000\\u000eAdobe\\u0000d?\\u0000\\u0000\\u0000\\u0001??\\u0000?\\u0000\\f\\b\\b\\b\\t\\b\\f\\t\\t\\f\\u0011\\u000b\\n\\u000b\\u0011\\u0015\\u000f\\f\\f\\u000f\\u0015\\u0018\\u0013\\u0013\\u0015\\u0013\\u0013\\u0018\\u0011\\f\\f\\f\\f\\f\\f\\u0011\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\u0001\\r\\u000b\\u000b\\r\\u000e\\r\\u0010\\u000e\\u000e\\u0010\\u0014\\u000e\\u000e\\u000e\\u0014\\u0014\\u000e\\u000e\\u000e\\u000e\\u0014\\u0011\\f\\f\\f\\f\\f\\u0011\\u0011\\f\\f\\f\\f\\f\\f\\u0011\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f??\\u0000\\u0011\\b\\u0000$\\u0000?\\u0003\\u0001\\\\u0000\\u0002\\u0011\\u0001\\u0003\\u0011\\u0001??\\u0000\\u0004\\u0000\\n??\\u0001?\\u0000\\u0000\\u0001\\u0005\\u0001\\u0001\\u0001\\u0001\\u0001\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0003\\u0000\\u0001\\u0002\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\u0001\\u0000\\u0001\\u0005\\u0001\\u0001\\u0001\\u0001\\u0001\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u0000\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\u0010\\u0000\\u0001\\u0004\\u0001\\u0003\\u0002\\u0004\\u0002\\u0005\\u0007\\u0006\\b\\u0005\\u0003\\f3\\u0001\\u0000\\u0002\\u0011\\u0003\\u0004!\\u00121\\u0005AQa\\u0013\\q?2\\u0006\\u0014???B#$\\u0015R?b34r??C\\u0007%?S???cs5\\u0016???&D?TdE??t6\\u0017?U?e?????u??F'???????????????Vfv????????7GWgw????????\\u0011\\u0000\\u0002\\u0002\\u0001\\u0002\\u0004\\u0004\\u0003\\u0004\\u0005\\u0006\\u0007\\u0007\\u0006\\u00055\\u0001\\u0000\\u0002\\u0011\\u0003!1\\u0012\\u0004AQaq\\\\u0013\\u00052??\\u0014??B#?R??3$b?r??CS\\u0015cs4?%\\u0006\\u0016???\\u0007&5??D?T?\\u0017dEU6te??????u??F???????????????Vfv????????'7GWgw???????\\u0000\\f\\u0003\\u0001\\u0000\\u0002\\u0011\\u0003\\u0011\\u0000?\\u0000?E[??;\\u0013\\u0006??????Z?0]?????????3?m?t?f}??/????????????:?????\\u0000K?\\u0000\\u0017_?\\u0011\\u0002?????F5.??\\u001b]L??05???<l??qq?}4???C^??\\u0000\\u0011???\\u0000?{?\\u0000??oC?e?2???+7\\r??&??[?>??z~?^?[-?}??V:??44PQ \\t&\\u0002`A\\u0012\\f??\\n?X???j\\u001c???????\\u0016???w?1??c?????n,????\\u0002\\u0012?-M??I\\u0005)$?IJU?3YM???n?sK?C#v????;k*g??V\\u001e????!?h?\\u0013?\\u0003RVN\\u0006\\u0016]????h??h????\\u0000\\u001fv;\\u0019??;\\u001a?z_???z^?!N?6Krk?\\u001a?0?\\u0016=???sN?5?-EB???\\u001a??^????\\u001d?q's??\\u001f????z*\\nRI$???I???nq\\r\\u0003?t\\t)t?+??G?E??4?\\u000b}F????,^???p?\\u0019???\\u0013\\'?\\u00034?\\u0000?s\\u0005_???=?????N??y????????\\\\?y?io?????w;??c?\\u0000?~????j?X??f??c?1???~?I?????\\u001c??,?~S???\\u0000???GcfU?fN3j????{ls???{?5?1?n???z~??}??\\u001e]??????????K^????\\u001b??????k?~E??{??P?l???\\t>?P?p?\\u0005?\\u0000??\\u0000?????\\u0000a\\u00133??\\u0002?sl??,?m/u??\\\\??????w?w?????r????r???????,]_??\\u0003?o?\\r???cY?e?~?u?Mv^5?\\u001a?j?c\\u0000?\\u0017?m?\\u00007eh???\\u0000*S??:?3?sZ?T???n\\u0000\\u001a?w?{\\u0018????????B??J?\\u0000?10?v3?w??????$??V??=??W?mX?Q???????;k=,Ue??X??f&?B?=????????F???g?[n^NmtdWS????????h?????\\u001a=OK??????}???\\u0011?hv?[?beU?Cn?\\u0010\\f?1?\\u001c?4???\\u001b??V?\\u0000c??????\\u001bE???\\u001d?\\u000688?????EsN????uXT_????vU-?O?X{\\u001df\\u0007?\\u001f??n???>?]?????=\\u001d??Tu*\\u001d??n\\u0016\\u000eP??sK??YT??k???{(k~????????\\u0003\\u001e???H\\u0010D?A???C?g???b?<????<~??,?R?????\\u0000??????\\rh\\rh\\u0010\\u0000?\\u0000\\u0013i-.??7?f?\\u0018>??Gii\\u0005??V?e\\u0014\\n??6??+?\\u0012\\u0004?=??~???Oclc?x\\u000ec?k?u\\u0004\\u001d\\u001c????D?b??k????W?V????????hs[^???c???g??\\u0000??\\u0014tS?????ev5????i\\u0004???\\u0003??m???\\\\<zQ?|?c??\\u0015????????v\\u0015\\u0015T?dd>?c?,??\\u001b\\u001d?6?[n???Z?G\\u001f?\\'??????~;???s?ln77y8?WX;??\\u001a?1?no???Uz??J?n????\\\\`\\rI<\\u0000?r???W?\\u0017d??5\\u000e\\ro??\\u00077??b?K?\\u0019?\\u0017?? ?????h,ap\\u0011?}?????????tG?ul??????-}/c\\u001c???\\u001f??\\u0014?kk~U???}??c???[?\\'??L?Z???T?\\u00167??ac\\u001cX????]??ev;??6????Q?W??>????@7WV???\\b??O??????\\u0016>???m?\\u001c?;!???????q?\\u0011?\\u001a?+??\\u0001??L????\\u001a?S?\\u0015h????X??,?e~??????h?\\u000e?????????\\u0000????Z\\u0003?\\u0015^\\r?*0[K-?????\\u0005????\\u001f??mk??????t??Z???h??k???gc\\bkv???#??]g??V?\\u000e????D???$??????$??????$?????? ??????\\'??????$??????$??????$??????$??????$?????\\u000e8Photoshop 3.0\\u00008BIM\\u0004%\\u0000\\u0000\\u0000\\u0000\\u0000\\u0010\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u00008BIM\\u0003?\\u0000\\u0000\\u0000\\u0000\\u0000\\u0010\\u0001,\\u0000\\u0000\\u0000\\u0001\\u0000\\u0002\\u0001,\\u0000\\u0000\\u0000\\u0001\\u0000\\u00028BIM\\u0004&\\u0000\\u0000\\u0000\\u0000\\u0000\\u000e\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000??\\u0000\\u00008BIM\\u0004\\r\\u0000\\u0000\\u0000\\u0000\\u0000\\u0004\\u0000\\u0000\\u0000\\u001e8BIM\\u0004\\u0019\\u0000\\u0000\\u0000\\u0000\\u0000\\u0004\\u0000\\u0000\\u0000\\u001e8BIM\\u0003?\\u0000\\u0000\\u0000\\u0000\\u0000\\t\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u00008BIM'\\u0010\\u0000\\u0000\\u0000\\u0000\\u0000\\n\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u00028BIM\\u0003?\\u0000\\u0000\\u0000\\u0000\\u0000H\\u0000/ff\\u0000\\u0001\\u0000lff\\u0000\\u0006\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u0000/ff\\u0000\\u0001\\u0000???\\u0000\\u0006\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u00002\\u0000\\u0000\\u0000\\u0001\\u0000Z\\u0000\\u0000\\u0000\\u0006\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u00005\\u0000\\u0000\\u0000\\u0001\\u0000-\\u0000\\u0000\\u0000\\u0006\\u0000\\u0000\\u0000\\u0000\\u0000\\u00018BIM\\u0003?\\u0000\\u0000\\u0000\\u0000\\u0000p\\u0000\\u0000??????????????????????\\u0003?\\u0000\\u0000\\u0000\\u0000??????????????????????\\u0003?\\u0000\\u0000\\u0000\\u0000??????????????????????\\u0003?\\u0000\\u0000\\u0000\\u0000??????????????????????\\u0003?\\u0000\\u00008BIM\\u0004\\b\\u0000\\u0000\\u0000\\u0000\\u0000\\u0010\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0002@\\u0000\\u0000\\u0002@\\u0000\\u0000\\u0000\\u00008BIM\\u0004\\u001e\\u0000\\u0000\\u0000\\u0000\\u0000\\u0004\\u0000\\u0000\\u0000\\u00008BIM\\u0004\\u001a\\u0000\\u0000\\u0000\\u0000\\u0003O\\u0000\\u0000\\u0000\\u0006\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000-\\u0000\\u0000\\u0000?\\u0000\\u0000\\u0000\\r\\u0000c\\u0000o\\u0000r\\u0000s\\u0000i\\u0000n\\u0000i\\u0000a\\u0000n\\u0000d\\u0000r\\u0000e\\u0000a\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000?\\u0000\\u0000\\u0000-\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0010\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000null\\u0000\\u0000\\u0000\\u0002\\u0000\\u0000\\u0000\\u0006boundsObjc\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000Rct1\\u0000\\u0000\\u0000\\u0004\\u0000\\u0000\\u0000\\u0000Top long\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000Leftlong\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000Btomlong\\u0000\\u0000\\u0000-\\u0000\\u0000\\u0000\\u0000Rghtlong\\u0000\\u0000\\u0000?\\u0000\\u0000\\u0000\\u0006slicesVlLs\\u0000\\u0000\\u0000\\u0001Objc\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0005slice\\u0000\\u0000\\u0000\\u0012\\u0000\\u0000\\u0000\\u0007sliceIDlong\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0007groupIDlong\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0006originenum\\u0000\\u0000\\u0000\\fESliceOrigin\\u0000\\u0000\\u0000\\rautoGenerated\\u0000\\u0000\\u0000\\u0000Typeenum\\u0000\\u0000\\u0000\\nESliceType\\u0000\\u0000\\u0000\\u0000Img \\u0000\\u0000\\u0000\\u0006boundsObjc\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000Rct1\\u0000\\u0000\\u0000\\u0004\\u0000\\u0000\\u0000\\u0000Top long\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000Leftlong\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000Btomlong\\u0000\\u0000\\u0000-\\u0000\\u0000\\u0000\\u0000Rghtlong\\u0000\\u0000\\u0000?\\u0000\\u0000\\u0000\\u0003urlTEXT\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000nullTEXT\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000MsgeTEXT\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0006altTagTEXT\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u000ecellTextIsHTMLbool\\u0001\\u0000\\u0000\\u0000\\bcellTextTEXT\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\thorzAlignenum\\u0000\\u0000\\u0000\\u000fESliceHorzAlign\\u0000\\u0000\\u0000\\u0007default\\u0000\\u0000\\u0000\\tvertAlignenum\\u0000\\u0000\\u0000\\u000fESliceVertAlign\\u0000\\u0000\\u0000\\u0007default\\u0000\\u0000\\u0000\\u000bbgColorTypeenum\\u0000\\u0000\\u0000\\u0011ESliceBGColorType\\u0000\\u0000\\u0000\\u0000None\\u0000\\u0000\\u0000\\ttopOutsetlong\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\nleftOutsetlong\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\fbottomOutsetlong\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u000brightOutsetlong\\u0000\\u0000\\u0000\\u0000\\u00008BIM\\u0004(\\u0000\\u0000\\u0000\\u0000\\u0000\\f\\u0000\\u0000\\u0000\\u0002??\\u0000\\u0000\\u0000\\u0000\\u0000\\u00008BIM\\u0004\\u0011\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u0001\\u00008BIM\\u0004\\u0014\\u0000\\u0000\\u0000\\u0000\\u0000\\u0004\\u0000\\u0000\\u0000\\u00018BIM\\u0004\\f\\u0000\\u0000\\u0000\\u0000\\bz\\u0000\\u0000\\u0000\\u0001\\u0000\\u0000\\u0000?\\u0000\\u0000\\u0000$\\u0000\\u0000\\u0001?\\u0000\\u0000C?\\u0000\\u0000\\b^\\u0000\\u0018\\u0000\\u0001????\\u0000\\u0010JFIF\\u0000\\u0001\\u0002\\u0000\\u0000H\\u0000H\\u0000\\u0000??\\u0000\\fAdobe_CM\\u0000\\u0002??\\u0000\\u000eAdobe\\u0000d?\\u0000\\u0000\\u0000\\u0001??\\u0000?\\u0000\\f\\b\\b\\b\\t\\b\\f\\t\\t\\f\\u0011\\u000b\\n\\u000b\\u0011\\u0015\\u000f\\f\\f\\u000f\\u0015\\u0018\\u0013\\u0013\\u0015\\u0013\\u0013\\u0018\\u0011\\f\\f\\f\\f\\f\\f\\u0011\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\u0001\\r\\u000b\\u000b\\r\\u000e\\r\\u0010\\u000e\\u000e\\u0010\\u0014\\u000e\\u000e\\u000e\\u0014\\u0014\\u000e\\u000e\\u000e\\u000e\\u0014\\u0011\\f\\f\\f\\f\\f\\u0011\\u0011\\f\\f\\f\\f\\f\\f\\u0011\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f\\f??\\u0000\\u0011\\b\\u0000$\\u0000?\\u0003\\u0001\\\\u0000\\u0002\\u0011\\u0001\\u0003\\u0011\\u0001??\\u0000\\u0004\\u0000\\n??\\u0001?\\u0000\\u0000\\u0001\\u0005\\u0001\\u0001\\u0001\\u0001\\u0001\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0003\\u0000\\u0001\\u0002\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\u0001\\u0000\\u0001\\u0005\\u0001\\u0001\\u0001\\u0001\\u0001\\u0001\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0001\\u0000\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\u0010\\u0000\\u0001\\u0004\\u0001\\u0003\\u0002\\u0004\\u0002\\u0005\\u0007\\u0006\\b\\u0005\\u0003\\f3\\u0001\\u0000\\u0002\\u0011\\u0003\\u0004!\\u00121\\u0005AQa\\u0013\\'q?2\\u0006\\u0014???B#$\\u0015R?b34r??C\\u0007%?S???cs5\\u0016???&D?TdE??t6\\u0017?U?e?????u??F'???????????????Vfv????????7GWgw????????\\u0011\\u0000\\u0002\\u0002\\u0001\\u0002\\u0004\\u0004\\u0003\\u0004\\u0005\\u0006\\u0007\\u0007\\u0006\\u00055\\u0001\\u0000\\u0002\\u0011\\u0003!1\\u0012\\u0004AQaq\\\\u0013\\u00052??\\u0014??B#?R??3$b?r??CS\\u0015cs4?%\\u0006\\u0016???\\u0007&5??D?T?\\u0017dEU6te??????u??F???????????????Vfv????????'7GWgw???????\\u0000\\f\\u0003\\u0001\\u0000\\u0002\\u0011\\u0003\\u0011\\u0000?\\u0000?E[??;\\u0013\\u0006??????Z?0]?????????3?m?t?f}??/????????????:?????\\u0000K?\\u0000\\u0017_?\\u0011\\u0002?????F5.??\\u001b]L??05???<l??qq?}4???C^??\\u0000\\u0011???\\u0000?{?\\u0000??oC?e?2???+7\\r??&??[?>??z~?^?[-?}??V:??44PQ \\t&\\u0002`A\\u0012\\f??\\n?X???j\\u001c???????\\u0016???w?1??c?????n,????\\u0002\\u0012?-M??I\\u0005)$?IJU?3YM???n?sK?C#v????;k*g??V\\u001e????!?h?\\u0013?\\u0003RVN\\u0006\\u0016]????h??h????\\u0000\\u001fv;\\u0019??;\\u001a?z_???z^?!N?6Krk?\\u001a?0?\\u0016=???sN?5?-EB???\\u001a??^????\\u001d?q's??\\u001f????z*\\nRI$???I???nq\\r\\u0003?t\\t)t?+??G?E??4?\\u000b}F????,^???p?\\u0019???\\u0013\\'?\\u00034?\\u0000?s\\u0005_???=?????N??y????????\\\\?y?io?????w;??c?\\u0000?~????j?X??f??c?1???~?I?????\\u001c??,?~S???\\u0000???GcfU?fN3j????{ls???{?5?1?n???z~??}??\\u001e]??????????K^????\\u001b??????k?~E??{??P?l???\\t>?P?p?\\u0005?\\u0000??\\u0000?????\\u0000a\\u00133??\\u0002?sl??,?m/u??\\\\??????w?w?????r????r???????,]_??\\u0003?o?\\r???cY?e?~?u?Mv^5?\\u001a?j?c\\u0000?\\u0017?m?\\u00007eh???\\u0000*S??:?3?sZ?T???n\\u0000\\u001a?w?{\\u0018????????B??J?\\u0000?10?v3?w??????$??V??=??W?mX?Q???????;k=,Ue??X??f&?B?=????????F???g?[n^NmtdWS????????h?????\\u001a=OK??????}???\\u0011?hv?[?beU?Cn?\\u0010\\f?1?\\u001c?4???\\u001b??V?\\u0000c??????\\u001bE???\\u001d?\\u000688?????EsN????uXT_????vU-?O?X{\\u001df\\u0007?\\u001f??n???>?]?????=\\u001d??Tu*\\u001d??n\\u0016\\u000eP??sK??YT??k???{(k~????????\\u0003\\u001e???H\\u0010D?A???C?g???b?<????<~??,?R?????\\u0000??????\\rh\\rh\\u0010\\u0000?\\u0000\\u0013i-.??7?f?\\u0018>??Gii\\u0005??V?e\\u0014\\n??6??+?\\u0012\\u0004?=??~???Oclc?x\\u000ec?k?u\\u0004\\u001d\\u001c????D?b??k????W?V????????hs[^???c???g??\\u0000??\\u0014tS?????ev5????i\\u0004???\\u0003??m???\\\\<zQ?|?c??\\u0015????????v\\u0015\\u0015T?dd>?c?,??\\u001b\\u001d?6?[n???Z?G\\u001f?\\'??????~;???s?ln77y8?WX;??\\u001a?1?no???Uz??J?n????\\\\`\\rI<\\u0000?r???W?\\u0017d??5\\u000e\\ro??\\u00077??b?K?\\u0019?\\u0017?? ?????h,ap\\u0011?}?????????tG?ul??????-}/c\\u001c???\\u001f??\\u0014?kk~U???}??c???[?\\'??L?Z???T?\\u00167??ac\\u001cX????]??ev;??6????Q?W??>????@7WV???\\b??O??????\\u0016>???m?\\u001c?;!???????q?\\u0011?\\u001a?+??\\u0001??L????\\u001a?S?\\u0015h????X??,?e~??????h?\\u000e?????????\\u0000????Z\\u0003?\\u0015^\\r?*0[K-?????\\u0005????\\u001f??mk??????t??Z???h??k???gc\\bkv???#??]g??V?\\u000e????D???$??????$??????$?????? ??????\\'??????$??????$??????$??????$??????$???8BIM\\u0004!\\u0000\\u0000\\u0000\\u0000\\u0000U\\u0000\\u0000\\u0000\\u0001\\u0001\\u0000\\u0000\\u0000\\u000f\\u0000A\\u0000d\\u0000o\\u0000b\\u0000e\\u0000 \\u0000P\\u0000h\\u0000o\\u0000t\\u0000o\\u0000s\\u0000h\\u0000o\\u0000p\\u0000\\u0000\\u0000\\u0013\\u0000A\\u0000d\\u0000o\\u0000b\\u0000e\\u0000 \\u0000P\\u0000h\\u0000o\\u0000t\\u0000o\\u0000s\\u0000h\\u0000o\\u0000p\\u0000 \\u0000C\\u0000S\\u00004\\u0000\\u0000\\u0000\\u0001\\u00008BIM\\u0004\\u0006\\u0000\\u0000\\u0000\\u0000\\u0000\\u0007\\u0000\\b\\u0000\\u0000\\u0000\\u0001\\u0001\\u0000??\\u0010Chttp://ns.adobe.com/xap/1.0/\\u0000<?xpacket begin=\\'???\\' id=\\'W5M0MpCehiHzreSzNTczkc9d\\'?>\\r\\n<x:xmpmeta xmlns:x=\\'adobe:ns:meta/\\' x:xmptk=\\'Adobe XMP Core 4.2.2-c063 53.352624, 2008/07/30-18:12:18        \\'>\\r\\n\\t<rdf:RDF xmlns:rdf=\\'http://www.w3.org/1999/02/22-rdf-syntax-ns#\\'>\\r\\n\\t\\t<rdf:Description rdf:about=\\\\' xmlns:xmp=\\'http://ns.adobe.com/xap/1.0/\\' xmlns:dc=\\'http://purl.org/dc/elements/1.1/\\' xmlns:photoshop=\\'http://ns.adobe.com/photoshop/1.0/\\' xmlns:xmpMM=\\'http://ns.adobe.com/xap/1.0/mm/\\' xmlns:stEvt=\\'http://ns.adobe.com/xap/1.0/sType/ResourceEvent#\\' xmlns:tiff=\\'http://ns.adobe.com/tiff/1.0/\\' xmlns:exif=\\'http://ns.adobe.com/exif/1.0/\\' xmp:CreatorTool=\\'Adobe Photoshop CS4 Windows\\' xmp:CreateDate=\\'2011-03-09T17:09:27+01:00\\' xmp:ModifyDate=\\'2011-03-09T17:10:23+01:00\\' xmp:MetadataDate=\\'2011-03-09T17:10:23+01:00\\' dc:format=\\'image/jpeg\\' photoshop:ColorMode=\\'3\\' xmpMM:InstanceID=\\'xmp.iid:C525B6FA3E4AE01195AFE2861A054AE9\\' xmpMM:DocumentID=\\'xmp.did:C525B6FA3E4AE01195AFE2861A054AE9\\' xmpMM:OriginalDocumentID=\\'xmp.did:C525B6FA3E4AE01195AFE2861A054AE9\\' tiff:Orientation=\\'1\\' tiff:XResolution=\\'3000000/10000\\' tiff:YResolution=\\'3000000/10000\\' tiff:ResolutionUnit=\\'2\\' tiff:NativeDigest=\\'256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;DE7B977DF6EFF346F11FF6BE697281C5\\' exif:PixelXDimension=\\'200\\' exif:PixelYDimension=\\'45\\' exif:ColorSpace=\\'65535\\' exif:NativeDigest=\\'36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;0E127CF2EACEDA719CA574253BD56212\\'>\\r\\n\\t\\t\\t<xmpMM:History>\\r\\n\\t\\t\\t\\t<rdf:Seq>\\r\\n\\t\\t\\t\\t\\t<rdf:li stEvt:action=\\'created\\' stEvt:instanceID=\\'xmp.iid:C525B6FA3E4AE01195AFE2861A054AE9\\' stEvt:when=\\'2011-03-09T17:10:23+01:00\\' stEvt:softwareAgent=\\'Adobe Photoshop CS4 Windows\\'/>\\r\\n\\t\\t\\t\\t</rdf:Seq>\\r\\n\\t\\t\\t</xmpMM:History>\\r\\n\\t\\t</rdf:Description>\\r\\n\\t</rdf:RDF>\\r\\n</x:xmpmeta>\\r\\n                                                                                                    \\n                                                                                                    o\\u000bP????\\u0006??T??/w?\\u0000\\u0007[???????',    'MailTechnician': 'email@email.it',    'WbsTechnician': 'xyz',    'NumberPincerTechnician': ''  }
这就是我使用的对象

public partial class tbl_tech
{
    public tbl_tech()
    {
        this.tbl_odl = new HashSet<tbl_odl>();
        this.tbl_pdr = new HashSet<tbl_pdr>();
    }

    public long IdTechnician { get; set; }
    public string DescTechnician { get; set; }
    public string LoginTechnician { get; set; }
    public string TelephoneTechnician { get; set; }
    public string SignatureTechnician { get; set; }
    public string MailTechnician { get; set; }
    public string WbsTechnician { get; set; }
    public string NumberPincerTechnician { get; set; }
    public Nullable<long> TypeTechnician { get; set; }

    public virtual ICollection<tbl_odl> tbl_odl { get; set; }
    public virtual ICollection<tbl_pdr> tbl_pdr { get; set; }
}
公共部分类tbl\u技术
{
公共tbl_技术()
{
this.tbl_odl=new HashSet();
this.tbl_pdr=new HashSet();
}
公共长idtechnology{get;set;}
公共字符串{get;set;}
公共字符串loginteechnician{get;set;}
公共字符串{get;set;}
公共字符串SignatureTechnician{get;set;}
公共字符串{get;set;}
公共字符串WbsTechnician{get;set;}
公共字符串NumberPincerTechnician{get;set;}
公共可为空的TypeTechnician{get;set;}
公共虚拟ICollection tbl_odl{get;set;}
公共虚拟ICollection tbl_pdr{get;set;}
}
这是VisualStudio生成的错误

{“无法从System.String强制转换或转换为eStartService.tbl_tech。”}


我不明白的是,对象的字段与我的对象的字段完全相同,那么给json的错误赋值在哪里呢?我觉得有什么不对吗?感谢

json是一个对象数组,而不是一个对象。请参见开头/结尾的
[
]

tbl_tech[] tech = (tbl_tech[])serializer.Deserialize(sr, typeof(tbl_tech[]));

如果我这样修改代码:

public partial class tbl_tech
{
        public tbl_tech()
        {
            //this.tbl_odl = new HashSet<tbl_odl>();
            //this.tbl_pdr = new HashSet<tbl_pdr>();
        }

        public long IdTechnician { get; set; }
        public string DescTechnician { get; set; }
        public string LoginTechnician { get; set; }
        public string TelephoneTechnician { get; set; }
        public string SignatureTechnician { get; set; }
        public string MailTechnician { get; set; }
        public string WbsTechnician { get; set; }
        public string NumberPincerTechnician { get; set; }
        public Nullable<long> TypeTechnician { get; set; }

        //public virtual ICollection<tbl_odl> tbl_odl { get; set; }
        //public virtual ICollection<tbl_pdr> tbl_pdr { get; set; }
    }
公共部分类tbl\u技术
{
公共tbl_技术()
{
//this.tbl_odl=new HashSet();
//this.tbl_pdr=new HashSet();
}
公共长idtechnology{get;set;}
公共字符串{get;set;}
公共字符串loginteechnician{get;set;}
公共字符串{get;set;}
公共字符串SignatureTechnician{get;set;}
公共字符串{get;set;}
公共字符串WbsTechnician{get;set;}
公共字符串NumberPincerTechnician{get;set;}
公共可为空的TypeTechnician{get;set;}
//公共虚拟ICollection tbl_odl{get;set;}
//公共虚拟ICollection tbl_pdr{get;set;}
}
反序列化
工作正常。因为现在您的
json
类型
相似。

在创建json表示时尝试使用

我也从数字中删除了“'”:

[{'IdTechnician': 4, 'DescTechnician': 'Surname Name', 'LoginTechnician': 'name',    'TypeTechnician': 1, 'TelephoneTechnician': '+123456789', 'SignatureTechnician': 'signaturepath', 'MailTechnician': 'email@email.com', 'WbsTechnician': 'XYZ',    'NumberPincerTechnician': 1}]
其中给出了以下模型:

public class RootObject
{
    public int IdTechnician { get; set; }
    public string DescTechnician { get; set; }
    public string LoginTechnician { get; set; }
    public int TypeTechnician { get; set; }
    public string TelephoneTechnician { get; set; }
    public string SignatureTechnician { get; set; }
    public string MailTechnician { get; set; }
    public string WbsTechnician { get; set; }
    public int NumberPincerTechnician { get; set; }
}
您可以通过以下方式对其进行反序列化:

IList<RootObject> result = new List<RootObject>();
using (StreamReader file = File.OpenText(@"path\\file.json"))
{
    result = JsonConvert.DeserializeObject<List<RootObject>>(file.ReadToEnd());
}
IList结果=新列表();
使用(StreamReader file=file.OpenText(@“path\\file.json”))
{
结果=JsonConvert.DeserializeObject(file.ReadToEnd());
}

从您的json字符串中删除
,因为现在它只是一个字符串而不是json请看一看您编辑的json字符串,它看起来很时髦…也许我理解,SignatureTechnician的字符串“value”中有引号,您可以修复它吗?请检查我的回答,下面是您在编辑之前使用的字符串:[{'IdTechnician':'4','Descentechanian':'姓氏名称','Logintechnian':'Name','TypeTechnician':'1','Telephonetechnian':'123456789','SignatureTechnician':'signaturepath','MailTechnician':'email@email.com“,”WBS技术员“:”XYZ“,”数字技术员“:”1'}]您的回答对于json2csharp是正确的。我需要一个json.net的解决方案,我不能为我正在做的项目更改库。问题是json.net。无论如何,谢谢。如果要反序列化对象的
类型不匹配,则
反序列化
失败。返回此错误:{”无法从System.String强制转换或转换为eStartService.tbl_tech[]。“}@Developer Wait…在您的文件中,您的开头和结尾都有
?您必须删除它们(按照@mivaweb的建议)。我已删除",但现在我有一个错误:附加信息:在解析一个值后遇到一个意外字符:\.Path'SignatureTechnician',第1行,位置2798。@Developer您显示给我们的文本没有2798个字符:-)加载完成,因为它太长。我的目标是获取SignatureTechnician,这是一个jpg image通过json.net发送,我编辑了这个问题,我想你失去了签名的所有字符。
IList<RootObject> result = new List<RootObject>();
using (StreamReader file = File.OpenText(@"path\\file.json"))
{
    result = JsonConvert.DeserializeObject<List<RootObject>>(file.ReadToEnd());
}