{"id":1685,"date":"2025-06-05T18:31:56","date_gmt":"2025-06-06T00:31:56","guid":{"rendered":"https:\/\/www.great-white-software.com\/blog\/?p=1685"},"modified":"2025-06-05T18:31:56","modified_gmt":"2025-06-06T00:31:56","slug":"wow-its-been-way-too-long","status":"publish","type":"post","link":"https:\/\/www.great-white-software.com\/blog\/2025\/06\/05\/wow-its-been-way-too-long\/","title":{"rendered":"Wow its been way too long"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Working on some neat projects and actually learning C# along with MAUI\/Uno\/Avalonia UI frameworks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of the things I&#8217;ve come to really like is the simplicity of serializing and deserializing class instances to \/from JSON.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In C# this is a one liner. In Xojo its a pile of work to read the JSON, create an instance &amp; then copy the Json data into the new instance<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In C# literally<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var item = JsonSerializer.Deserialize&lt;Type>( data ) ;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">will take the Json and move the corresponding json keys into the matching properties in a new instance of the type given.<br>Yeah the notation is a little odd to Xojo users (but Xojo has NO notation for doing this sort of thing)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the closest it might be<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Vendor_Item item = JsonSerializer.Deserialize(content, new Vendor_Item);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That is assuming Xojo had a JsonSerializer that worked like this. While YOU have to make sure you call it right (new whatever) its at least close<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But, it doesnt have one like that<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, I have<a href=\"https:\/\/github.com\/npalardy\/JSONSerializer\"> created one<\/a> (you HAD to know that was coming right ?)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Give it a spin &amp; leave me feedback about it if you would<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working on some neat projects and actually learning C# along with MAUI\/Uno\/Avalonia UI frameworks. One of the things I&#8217;ve come to really like is the simplicity of serializing and deserializing class instances to \/from JSON. In C# this is a one liner. In Xojo its a pile of work to read the JSON, create an &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.great-white-software.com\/blog\/2025\/06\/05\/wow-its-been-way-too-long\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Wow its been way too long&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-1685","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/1685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/comments?post=1685"}],"version-history":[{"count":1,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/1685\/revisions"}],"predecessor-version":[{"id":1686,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/1685\/revisions\/1686"}],"wp:attachment":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/media?parent=1685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/categories?post=1685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/tags?post=1685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}