<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>System-Text-Json on Tokenise</title><link>https://tokenise.rosvetic.com/tags/system-text-json/</link><description>Recent content in System-Text-Json on Tokenise</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Thu, 26 Nov 2026 07:06:00 +0000</lastBuildDate><atom:link href="https://tokenise.rosvetic.com/tags/system-text-json/index.xml" rel="self" type="application/rss+xml"/><item><title>Move from Newtonsoft.Json to System.Text.Json without changing what your API accepts</title><link>https://tokenise.rosvetic.com/posts/newtonsoft-to-system-text-json-parity-ledger-agent-csharp/</link><pubDate>Thu, 26 Nov 2026 07:06:00 +0000</pubDate><guid>https://tokenise.rosvetic.com/posts/newtonsoft-to-system-text-json-parity-ledger-agent-csharp/</guid><description>&lt;p&gt;Somebody swaps &lt;code&gt;JsonConvert&lt;/code&gt; for &lt;code&gt;System.Text.Json&lt;/code&gt; across a service, the build is green, the existing tests are green, and a week later a partner&amp;rsquo;s integration starts returning 400s. Their client has always sent &lt;code&gt;&amp;quot;status&amp;quot;: &amp;quot;shipped&amp;quot;&lt;/code&gt; in lower case. Or a trailing comma. Or &lt;code&gt;&amp;quot;total&amp;quot;: &amp;quot;12.5&amp;quot;&lt;/code&gt; in quotes. Newtonsoft.Json accepted all of it without a word, and nobody ever wrote that down, so nothing in the test suite knew.&lt;/p&gt;</description></item><item><title>Your agent's API accepts payloads it should reject: pin the JSON contract with a rejection corpus and .NET 10 strict options</title><link>https://tokenise.rosvetic.com/posts/strict-json-wire-contract-agent-dtos-csharp/</link><pubDate>Wed, 11 Nov 2026 07:06:00 +0000</pubDate><guid>https://tokenise.rosvetic.com/posts/strict-json-wire-contract-agent-dtos-csharp/</guid><description>&lt;p&gt;A client sends &lt;code&gt;{&amp;quot;email&amp;quot;:&amp;quot;a@b.c&amp;quot;,&amp;quot;age&amp;quot;:30,&amp;quot;rol&amp;quot;:&amp;quot;Admin&amp;quot;}&lt;/code&gt;. The API answers 201 Created with a viewer account, because &lt;code&gt;rol&lt;/code&gt; isn&amp;rsquo;t a property it knows and nobody told it to care. Another client sends &lt;code&gt;&amp;quot;amount&amp;quot;:10&lt;/code&gt; and then, further down the same object, &lt;code&gt;&amp;quot;amount&amp;quot;:9999&lt;/code&gt;. The API charges 9999. A third omits &lt;code&gt;email&lt;/code&gt; entirely and gets an account with a null address.&lt;/p&gt;</description></item></channel></rss>