{"id":1008,"date":"2021-01-11T01:41:54","date_gmt":"2021-01-11T06:41:54","guid":{"rendered":"https:\/\/badecho.com\/?p=1008"},"modified":"2021-02-18T17:54:38","modified_gmt":"2021-02-18T22:54:38","slug":"when-to-use-var","status":"publish","type":"post","link":"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/","title":{"rendered":"Readability Nightmare: When and When Not to Use var"},"content":{"rendered":"\n<h2><em>var<\/em> : A Hotbed of Extremism<\/h2>\n\n\n\n<p>Life used to be simple, however with the release of C# 3.0, <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/language-reference\/keywords\/var\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft ushered into the world<\/a> the birth of the implicit type keyword known as <code>var<\/code>. With this keyword, we are able to make local variable declarations without having to specify the actual type of the variable. With <code>var<\/code>, the compiler takes care of that nasty bit of business for us.<\/p>\n\n\n\n<p>Instead of having to write the following:<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n\/\/ No var yet :(\nint number = 10;\nstring message = &quot;Hello there&quot;;\n<\/pre>\n\n\n<p>We can now write it like so:<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n\/\/ Hooray we have var! :)\nvar number = 10;\nvar message = &quot;Hello there&quot;;\n<\/pre>\n\n\n<p>A good software developer will seek to reduce the redundancy in the things that they do; a proper engineer seeks to to optimize processes and increase efficiency. It&#8217;s only natural that many developers saw this new feature and recognized the boost in productivity it could offer in relation to writing code.<\/p>\n\n\n\n<p>Declaring a local variable used to require the writer to know what <em>exactly<\/em> they were declaring. Not only that, it required the writer to have to <em>actually write it<\/em>. These things take time, so why bother with any of that when we can just simply declare all local variables as type <code>var<\/code>? Why indeed. This was the question asked by many a developer, and from this question a new form of software development extremism was born: <em>Thou Shalt Always Use &#8220;var&#8221;<\/em>.<\/p>\n\n\n\n<p>To a very casual informer, this may appear as just another case of some guy on the internet making a very large exaggeration of things. But it really isn&#8217;t, and belief in this extreme approach is widespread. If you Google the topic, you will probably find that most people posting on <a href=\"http:\/\/stackoverflow.com\" target=\"_blank\" rel=\"noreferrer noopener\">Stack Overflow<\/a> as well as writing their own articles subscribe to the pervasive use of <code>var<\/code>.<\/p>\n\n\n\n<p>Most prominently, however, is the (enabled by default) inspection rule in <a rel=\"noreferrer noopener\" href=\"https:\/\/www.jetbrains.com\/resharper\/\" target=\"_blank\">ReSharper<\/a> that will yell at you if you even <em>think<\/em> to declare a local variable using any type other than <code>var<\/code>. The keyword <code>var<\/code>, like every other feature in a programming language, is a tool that has its purpose. And, like any tool, there are times where it is sensible to use it, and many times where it is not. <\/p>\n\n\n\n<p>I will go over the problems <code>var<\/code> causes, as well as <a href=\"#when-it-is-ok-to-use\">when it should and shouldn&#8217;t be used in a bit<\/a>; but first, let&#8217;s take a look at some history and ask ourselves why <code>var<\/code> even exists.<\/p>\n\n\n\n<h2>The Origins and Purpose of <em>var<\/em><\/h2>\n\n\n\n<p>Was <code>var<\/code> added to the language because Microsoft suddenly adopted a hipster-ish attitude towards local variable types, uttering a collective <em>PFFT<\/em> towards the plebian uses of <code>int<\/code>, <code>string<\/code>, and <code>MyClass<\/code> local type declarations?<\/p>\n\n\n\n<p>Well don&#8217;t look at me. How am I supposed to be able to read their minds? Mind reading aside, we <em>can<\/em> state definitely that the introduction of the <code>var<\/code> keyword was necessitated by the introduction of another feature into C# 3.0: <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/programming-guide\/classes-and-structs\/anonymous-types\" target=\"_blank\">Anonymous Types<\/a>. With anonymous types, we are able to create types on the fly. Often we&#8217;ll create these types while in the middle of some sort of complicated LINQ query in order to aid in the filtering or projection of some sort of desired result. <\/p>\n\n\n\n<p>Here is a very simple example:<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nvar coolNewType = new {Id = 12, Message = &quot;Hey Buddy!&quot;};\n\nint id = coolNewType.Id;\nstring message = coolNewType.Message;\n<\/pre>\n\n\n<p>So, what&#8217;s the type of <code>coolNewType<\/code>? If you look under the covers during runtime, you&#8217;ll see that its type is actually <code>&lt;&gt;f__AnonymousType0`2<\/code>. This is of course, hideous and cannot actually be expressed in our code, so we <em>have<\/em> to use <code>var<\/code> here. <\/p>\n\n\n\n<p>This is not the <em>only<\/em> reason for the introduction of this keyword, but it is probably the <em>primary<\/em> reason. Redundant type specifications in code is of course a very large annoyance, and is indeed another reason why <code>var<\/code> was introduced into the language. At least, according to Eric Lippert, one of the big bois on the C# team at the time. Feel free to read more of his thoughts on the matter in his article &#8220;<a href=\"https:\/\/docs.microsoft.com\/en-us\/archive\/blogs\/ericlippert\/c-3-0-is-still-statically-typed-honest\" target=\"_blank\" rel=\"noreferrer noopener\">C# 3.0 is still statically typed, honest!<\/a>&#8220;<\/p>\n\n\n\n<p>But what&#8217;s actually redundantly obvious vs not is <em>very<\/em> subjective, and something I hope to grant some clarity with this writing. But before we get to that, let&#8217;s get to proclaiming one of my very own dogmas.<\/p>\n\n\n\n<p>Ready?<\/p>\n\n\n\n<h2><em>var<\/em> Makes Code Easier to Write, But Harder to Read<\/h2>\n\n\n\n<p>The <code>var<\/code> keyword has a countless number of proselytizers that proclaim it increases code readability. But what does it mean for code to be easier to read? Does it simply refer to code being more pleasant to the eye and less &#8220;ugly&#8221;, or should it perhaps refer to the ease in which one might actually <em>understand<\/em> what the code is doing? I suspect that these advocates are of the mind that it refers to the former, and like other extremists, their beliefs have been shaped by a world view so simplified that it is unrealistic.<\/p>\n\n\n\n<p>A few years ago, I didn&#8217;t have any strong opinions on the <code>var<\/code> keyword. My initial opinion on the matter was that it was more of a negative than a positive since it essentially hides information from the reader. But, other than that thought, I didn&#8217;t see it as too much of a bad thing really.<\/p>\n\n\n\n<p>This all changed when I got a new job where the coding convention made rampant use of the <code>var<\/code> keyword. The software that was worked on dealt with very complex engineering concerns, with a lot of math and classes that dealt with signal transformations and the like. And I can say, with real world experience on the matter under my belt, that learning how the code worked and what it did, was made way, <em>way<\/em> more of a nightmare because of the use of the <code>var<\/code> keyword.<\/p>\n\n\n\n<p>If you&#8217;re dealing with real world code, with real world business concerns, then you have a complex hierarchy of objects you have to deal with. This is unavoidable and anyone who pretends otherwise lives in an ivory tower, probably making their living by selling books peddled by the useless idiots barking their dogmatic truths.<\/p>\n\n\n\n<p>Because of the rampant use of the <code>var<\/code> keyword I no longer could tell just by eyeballing the code exactly what types of data I was working with. I <em>had<\/em> to either Ctrl+Click the properties (going to their definition), or hover over the variable. This is a <em>failure<\/em> in code writing, and horrifically tedious to work with. I&#8217;ll admit, every time I was told to replace a declared variable type with <code>var<\/code> during a code review, I died a little bit inside. <\/p>\n\n\n\n<p>Real world problems aside, I&#8217;ve recently noticed yet another shortcoming to the rampant use of <code>var<\/code>, and it has to do with a somewhat new feature to the language we&#8217;re all still probably wrapping our heads around.<\/p>\n\n\n\n<h2>Nullable Reference Types and <em>var<\/em><\/h2>\n\n\n\n<p>With the release of C# 8.0, Microsoft has bequeathed unto us the <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/nullable-references\" target=\"_blank\" rel=\"noreferrer noopener\">nullable reference types<\/a> feature. I&#8217;ve just started using it myself in some of my own projects, so jury is still out on this one, but I am liking what I see so far. If you&#8217;re unfamiliar with the feature, go check out the link I just provided as Microsoft will be able to explain it better than I can.<\/p>\n\n\n\n<p>Working with this feature enabled can cause additional problems to pop up if you&#8217;re a heavy user of the <code>var<\/code> keyword. With nullable references enabled, the two following statements become an important part of the code you&#8217;ll be writing:<\/p>\n\n\n\n<ul><li>whether a reference isn&#8217;t supported to be null, and<\/li><li>whether a reference may be null<\/li><\/ul>\n\n\n\n<p>Use of the var keyword may result in communication regarding these two statements effectively being lost. As an example, let&#8217;s take a look at some code I wrote up while working with the <code>System.Text.Json<\/code> namespace:<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nvar typePropertyName = reader.GetString();\nif (typePropertyName != TypePropertyName)\n{\n    throw new JsonException(\n        Strings.JsonInvalidTypeName.CulturedFormat(typePropertyName, TypePropertyName));\n}\n\nreader.Read();\nif (reader.TokenType != JsonTokenType.Number)\n    throw new JsonException(Strings.JsonTypeValueNotNumber);\n\nvar typeDescriptor = reader.GetInt32().ToEnum&lt;TTypeDescriptor&gt;();\nreader.Read();\n\nif (reader.TokenType != JsonTokenType.PropertyName)\n    throw new JsonException(Strings.JsonMalformedText);\n\nvar dataPropertyName = reader.GetString();\nif (dataPropertyName != DataPropertyName)\n{\n    throw new JsonException(\n        Strings.JsonInvalidTypeName.CulturedFormat(dataPropertyName, DataPropertyName));\n}\n<\/pre>\n\n\n<p>Some normal and seemingly harmless looking code. We see several <code>var<\/code> typed variables being declared, and the use of <code>var<\/code> would probably appear totally OK to many, as the type is <em>obvious<\/em> from the method names being invoked, right? I mean, the method invocation <code>reader.GetString()<\/code> would appear to clearly imply that it is returning a <code>string<\/code>, no? Except that it isn&#8217;t returning a <code>string<\/code>, it&#8217;s actually returning a <code>string?<\/code>. <\/p>\n\n\n\n<p>The opportunity to make a statement that the <code>typePropertyName<\/code> and <code>dataPropertyName<\/code> variables may be null is effectively lost if we decide to use <code>var<\/code> in more ways than one. If you look back at the first link I provided to Microsoft&#8217;s <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/language-reference\/keywords\/var\" target=\"_blank\" rel=\"noreferrer noopener\">documentation on the keyword<\/a>, you will see a section near the top that states the following:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>When&nbsp;<code>var<\/code>&nbsp;is used with&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/language-reference\/builtin-types\/nullable-reference-types\">nullable reference types<\/a>&nbsp;enabled, it always implies a nullable reference type even if the expression type isn&#8217;t nullable.<\/p><cite>Microsoft<\/cite><\/blockquote>\n\n\n\n<p>Loss of information, loss of information, loss of information.<\/p>\n\n\n\n<h2 id=\"when-it-is-ok-to-use\">When Is it OK to Use <em>var<\/em>?<\/h2>\n\n\n\n<p>Please don&#8217;t just use tools blatantly people, and do as George Carlin says and learn to <em>question<\/em> what&#8217;s being fed to you. I&#8217;ve done a lot of questioning of this practice myself, and after many thoughts on the matter, I have, for your benefit, a nice guide to follow for when it makes actually makes sense to use <code>var<\/code> so that you don&#8217;t make your code a nightmare to understand.<\/p>\n\n\n\n<h3>I. When You Have To (i.e. Anonymous Types)<\/h3>\n\n\n\n<p>Yes, yes, this is a bit obvious, but I wanted this list to be complete! Of course, if you&#8217;re ever dealing with anonymous types, and you need to store a reference to one locally, then of course make sweet use of that <code>var<\/code> keyword baby!<\/p>\n\n\n\n<p>I mean, you really don&#8217;t have any other option&#8230;.but I&#8217;m just putting it out there.<\/p>\n\n\n\n<h3>II. Object Creation via the <em>new<\/em> Keyword<\/h3>\n\n\n\n<p>You&#8217;ll hear many fervent adopters of <code>var<\/code> keyword indulgence say that you should use it whenever the assignment statement makes it obvious as to what type will be returned. A measure of something&#8217;s level of obviousness is really a very subjective matter. Things that may appear to be incredibly obvious to an expert in a particular domain model can very easily be viewed as anything but obvious from a newbie&#8217;s perspective.<\/p>\n\n\n\n<p>There&#8217;s actually only a few kinds of statements that leave no room for doubt as to the type of object being assigned. An object creation expression utilizing the <code>new<\/code> keyword is one of those.<\/p>\n\n\n\n<p>Indeed, it is incredibly annoying to have to write something like:<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nList&lt;KeyValuePair&lt;int,string&gt;&gt; niceList = new List&lt;KeyValuePair&lt;int,string&gt;&gt;();\n<\/pre>\n\n\n<p>Save yourself the heartburn and relax in the comfort offered by the <code>var<\/code> keyword, as there can be no doubt whatsoever as to what is being returned.<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nvar niceList = new List&lt;KeyValuePair&lt;int,string&gt;&gt;();\n<\/pre>\n\n\n<p>Indeed, this very specific type of redundancy reduction was stated to be one of the driving factors behind the creation of the <code>var<\/code> keyword by <a href=\"https:\/\/docs.microsoft.com\/en-us\/archive\/blogs\/ericlippert\/c-3-0-is-still-statically-typed-honest\" target=\"_blank\" rel=\"noreferrer noopener\">one of the language designers<\/a>.<\/p>\n\n\n\n<p>With C# 9.0, however, we now have target-typed new expressions. This looks like:<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nList&lt;KeyValuePair&lt;int,string&gt;&gt; niceList = new();\n<\/pre>\n\n\n<p>Of course this requires a default constructor, but if one is available, then you have even one less reason to use var. I mean, you still can, however you technically save a few keystrokes if you go the target-typed new expression route. Just saying.<\/p>\n\n\n\n<h3>III. Explicit Type Conversions<\/h3>\n\n\n\n<p>Another example of a statement where the type being returned is <em>actually<\/em> obvious is one where an explicit cast is used.<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nvar options = (JsonSerializerOptions)foo;\n<\/pre>\n\n\n<p>If I scolded you for using <code>var<\/code> for a statement like the above, then you would have proof that I&#8217;m simply spouting hot air. But nay, you need not worry friend, as this type of statement makes it <em>actually<\/em> obvious as to what type is returned. So feel free to <code>var<\/code> it up.<\/p>\n\n\n\n<h3>IV. When a Generic Parameter Controls the Results<\/h3>\n\n\n\n<p>Yes, this is wading a bit into non-obvious waters, as it consists of statements not being controlled by built-in keywords, but if the return type of a method is directly controlled via a generic type parameter, then you may feel free to use <code>var<\/code>. <\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nvar obviousReader = Activator.CreateInstance&lt;StreamReader&gt;();\n<\/pre>\n\n\n<p>This starts to dip its toes into the territory bordering the land of obviousness, so, as with everything else, use your head.<\/p>\n\n\n\n<h3>V. When Enumerating a Local <em>IEnumerable&lt;T&gt;<\/em><\/h3>\n\n\n\n<p>If we have a local variable of type of <code>IEnumerable&lt;T&gt;<\/code>, we can more or less be assured that the object returned from enumerating it will be of type <code>T<\/code>. <\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nIEnumerable&lt;Type&gt; types = FromSomewhere();\n\nforeach (var type in types)\n{\n    \/\/ Do stuff...\n}\n<\/pre>\n\n\n<p>Although this too begins to dip its toes into the land of uncertainty, I feel that it&#8217;s acceptable to also use <code>var<\/code> if we&#8217;re accessing a local collection via an indexer or some other standard method. All within reason of course.<\/p>\n\n\n\n<h3>VI. When Assigning Another Local Variable or Method Parameter<\/h3>\n\n\n\n<p>If we need to declare a variable to hold a reference to another local variable or method parameter, there can be no doubt as to what that type is, so no harm in using <code>var<\/code> here as well.<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nIEnumerable&lt;Type&gt; types = FromSomewhere();\n\nforeach (var type in types)\n{\n    \/\/ To prevent closures from closing over a non-local variable.\n    var localType = type;\n\n    \/\/ Do some lambda stuff.\n}\n<\/pre>\n\n\n<h2>And That&#8217;s It!<\/h2>\n\n\n\n<p>These are the only cases in which I&#8217;ll use the <code>var<\/code> keyword. Using it anywhere else is simply making your code harder to understand for the next person who has to read it. Making your code writing process as efficient as possible is of course important, however the readability of your code far outweighs the convenience you get from not having to type local variable types. <\/p>\n\n\n\n<p>For real world projects with a full object hierarchy, the overuse of <code>var<\/code> will require anyone new to the project unnecessary pain, making them have to hover over everything in order to make sense of things. Don&#8217;t just take my word for it, take a look at what <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/dotnet\/runtime\" target=\"_blank\">Microsoft does on their own source repository for .NET 5.0<\/a>. I&#8217;m sure you can find some examples that counter what I&#8217;ve said, but you&#8217;ll observe an overwhelming lack of the use of <code>var<\/code> for cases that fall outside of what I listed above.<\/p>\n\n\n\n<p>So do yourself and everyone else a favor and disable the <strong>Use preferred &#8216;var&#8217; style<\/strong> ReSharper rule the next time you&#8217;re able to. You&#8217;ll be making the world a better place. As always, question commonly peddled advice, and try to find what those in the know do. <\/p>\n\n\n\n<p>Thanks for reading! Hope you found this useful. Until next time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>var : A Hotbed of Extremism Life used to be simple, however with the release of C# 3.0, Microsoft ushered [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[41,42,52],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v14.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Readability Nightmare: When and When Not to Use var - omni&#039;s hackpad<\/title>\r\n<meta name=\"description\" content=\"The &quot;var&quot; keyword is a controversial topic with C# development. Here is a record of my experiences with it and when it&#039;s used in my own code.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Readability Nightmare: When and When Not to Use var - omni&#039;s hackpad\" \/>\r\n<meta property=\"og:description\" content=\"The &quot;var&quot; keyword is a controversial topic with C# development. Here is a record of my experiences with it and when it&#039;s used in my own code.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/\" \/>\r\n<meta property=\"og:site_name\" content=\"omni&#039;s hackpad\" \/>\r\n<meta property=\"article:published_time\" content=\"2021-01-11T06:41:54+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2021-02-18T22:54:38+00:00\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/badecho.com\/#website\",\"url\":\"https:\/\/badecho.com\/\",\"name\":\"omni&#039;s hackpad\",\"description\":\"Game Code Disassembly. Omnified Modification. Madness.\",\"publisher\":{\"@id\":\"https:\/\/badecho.com\/#\/schema\/person\/3de67496328be7ae6e1f52faf582e9d2\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/badecho.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/#webpage\",\"url\":\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/\",\"name\":\"Readability Nightmare: When and When Not to Use var - omni&#039;s hackpad\",\"isPartOf\":{\"@id\":\"https:\/\/badecho.com\/#website\"},\"datePublished\":\"2021-01-11T06:41:54+00:00\",\"dateModified\":\"2021-02-18T22:54:38+00:00\",\"description\":\"The \\\"var\\\" keyword is a controversial topic with C# development. Here is a record of my experiences with it and when it's used in my own code.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/#webpage\"},\"author\":{\"@id\":\"https:\/\/badecho.com\/#\/schema\/person\/3de67496328be7ae6e1f52faf582e9d2\"},\"headline\":\"Readability Nightmare: When and When Not to Use var\",\"datePublished\":\"2021-01-11T06:41:54+00:00\",\"dateModified\":\"2021-02-18T22:54:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/badecho.com\/index.php\/2021\/01\/11\/when-to-use-var\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/badecho.com\/#\/schema\/person\/3de67496328be7ae6e1f52faf582e9d2\"},\"keywords\":\".NET,C#,var\",\"articleSection\":\"General Dev\",\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/badecho.com\/#\/schema\/person\/3de67496328be7ae6e1f52faf582e9d2\",\"name\":\"Matt Weber\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/badecho.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7e345ac2708b3a41c7bd70a4a0440d41?s=96&d=mm&r=g\",\"caption\":\"Matt Weber\"},\"logo\":{\"@id\":\"https:\/\/badecho.com\/#personlogo\"}}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/posts\/1008"}],"collection":[{"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/comments?post=1008"}],"version-history":[{"count":45,"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/posts\/1008\/revisions"}],"predecessor-version":[{"id":1270,"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/posts\/1008\/revisions\/1270"}],"wp:attachment":[{"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/media?parent=1008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/categories?post=1008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badecho.com\/index.php\/wp-json\/wp\/v2\/tags?post=1008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}