<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[בעיה בקריאה של עברית מקובץ JSON (*נפתר*)]]></title><description><![CDATA[<p dir="auto">יש לי קובץ JSON שמכיל נתוני דמה לטסטים.<br />
אני קורא אותו מתוך הקוד (על ידי שימוש ב HttpClient וביצוע סריאליזציה לתוך מערך) באמצעות הקריאה הבאה:</p>
<pre><code>await Http.GetFromJsonAsync&lt;Donation[]&gt;("sample-data/donations.json");
</code></pre>
<p dir="auto">הכל עובד טוב, עד שהקובץ מכיל גם מחרוזות בעברית, ואני מקבל את השגיאה הבאה:</p>
<pre><code>The JSON value could not be converted to System.String
</code></pre>
<p dir="auto">ניסיתי להשתמש ב NewtonSoft.Json ואז אכן השגיאה נעלמת, אבל התווים עדיין לא מקודדים נכון ואני מקבל ג'יבריש במקום עברית:</p>
<p dir="auto"><img src="/assets/uploads/files/1651613089657-9676e01d-b24d-446b-90ab-ff7f6c99041f-%D7%AA%D7%9E%D7%95%D7%A0%D7%94.png" alt="9676e01d-b24d-446b-90ab-ff7f6c99041f-תמונה.png" class=" img-fluid img-markdown" /><br />
מה לעשות?</p>
]]></description><link>https://tchumim.com/topic/13234/בעיה-בקריאה-של-עברית-מקובץ-json-נפתר</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 08:05:14 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/13234.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 May 2022 21:25:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to בעיה בקריאה של עברית מקובץ JSON (*נפתר*) on Tue, 03 May 2022 21:34:50 GMT]]></title><description><![CDATA[<p dir="auto"><strong>עדכון: מצאתי פתרון.</strong><br />
הבעיה הייתה בקידוד של הקובץ עצמו. הוא היה מקודד כ-ANSI.<br />
הפתרון הוא פשוט לפתוח אותו בפנקס הרשימות, ולשמור אותו מחדש בקידוד UTF-8.</p>
]]></description><link>https://tchumim.com/post/139544</link><guid isPermaLink="true">https://tchumim.com/post/139544</guid><dc:creator><![CDATA[OdedDvir]]></dc:creator><pubDate>Tue, 03 May 2022 21:34:50 GMT</pubDate></item></channel></rss>