{"id":1778,"date":"2023-06-07T15:14:17","date_gmt":"2023-06-07T15:14:17","guid":{"rendered":"https:\/\/datmt.com\/?p=1778"},"modified":"2023-07-31T13:45:05","modified_gmt":"2023-07-31T13:45:05","slug":"using-interface-in-spring-boot-requestbody","status":"publish","type":"post","link":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/","title":{"rendered":"Using Interface In Spring Boot @RequestBody"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>Recently, for the first time, I encounter a need to use an interface in @RequestBody in my Spring Boot app.<\/p>\n\n\n\n<p>Here is the diagram:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"401\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/image-1024x401.png\" alt=\"\" class=\"wp-image-1779\" srcset=\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/image-1024x401.png 1024w, https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/image-300x118.png 300w, https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/image-768x301.png 768w, https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/image.png 1342w\" \/><\/figure>\n\n\n\n<p>This is the request that contains one <code>IAudioContent<\/code><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">public record CreateQuestionGroupRequest(\n        String content,\n        IAudioContent audioContent\n) {\n}<\/pre><\/div>\n\n\n\n<p>However, when I sent a request to create a question group with <code>TTSSingleRequest<\/code> in JSON format for example, I got the following error:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class io.ukata.api.helpers.http.request.IAudioContent]\n....\nCaused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.ukata.api.helpers.http.request.IAudioContent` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n<\/pre><\/div>\n\n\n\n<p>This is because Jackson could not create an instance of an interface. In this case, that&#8217;s <code>IAudioContent<\/code>.<\/p>\n\n\n\n<p>I&#8217;m going to show you how to fix this using a custom deserializer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using a Custom Deserializer <\/h2>\n\n\n\n<p>The solution to the problem above is to use a custom deserializer. <\/p>\n\n\n\n<p>First, create a new deserializer:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">public class AudioContentDeserializer extends JsonDeserializer&lt;IAudioContent&gt; {\n\n    @Override\n    public IAudioContent deserialize(JsonParser parser, DeserializationContext context) throws IOException {\n        ObjectMapper mapper = (ObjectMapper) parser.getCodec();\n        ObjectNode root = mapper.readTree(parser);\n\n        if (root.has(&quot;type&quot;)) {\n            String type = root.get(&quot;type&quot;).asText();\n            if (type.equals(AudioContentType.NARRATION.getType())) {\n                return mapper.readValue(root.toString(), TTSSingleRequest.class);\n            } else if (type.equals(AudioContentType.CONVERSATION.getType())) {\n                return mapper.readValue(root.toString(), TTSConversationRequest.class);\n            }  else {\n                throw new RuntimeException(&quot;Unknown audio content type&quot;);\n            }\n        } else {\n            throw new RuntimeException(&quot;Unknown audio content type&quot;);\n        }\n\n    }\n}\n<\/pre><\/div>\n\n\n\n<p>As you can see, here I categorized the implementation by a key called &#8220;type&#8221;. Your case could be different. <\/p>\n\n\n\n<p>After creating this deserializer, you add this annotation at the class level of the interface:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">@JsonDeserialize(using = AudioContentDeserializer.class)\npublic interface IAudioContent {\n\/\/...\n}<\/pre><\/div>\n\n\n\n<p>Now, this custom deserializer will be used to deserialize JSON to implementation of IAudioContent.<\/p>\n\n\n\n<p>We are not done yet. At the class level of all implementations, you also need to put <code>@JsonDeserialize<\/code> to tell Jackson not to use the custom deserializer again. If you forget to put this in the implementations, you may encounter an infinite loop.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">@JsonDeserialize(using = JsonDeserializer.None.class)\npublic class TOEICStatementAudio implements IAudioContent {\n\/\/...\n}<\/pre><\/div>\n\n\n\n<p>That&#8217;s it! You can now use interfaces, abstract classes in @RequestBody in Spring Boot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In this post, I&#8217;ve shown you how you can use interfaces and abstract classes in Spring Boot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Recently, for the first time, I encounter a need to use an interface in @RequestBody in my Spring Boot app. Here is the diagram: This is the request that contains one IAudioContent However, when I sent a request to create a question group with TTSSingleRequest in JSON format for example, I got the following &#8230; <a title=\"Using Interface In Spring Boot @RequestBody\" class=\"read-more\" href=\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\" aria-label=\"Read more about Using Interface In Spring Boot @RequestBody\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":1780,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[4],"tags":[261,101,50],"class_list":["post-1778","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-jackson","tag-java","tag-spring-boot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Interface In Spring Boot @RequestBody - datmt<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Interface In Spring Boot @RequestBody - datmt\" \/>\n<meta property=\"og:description\" content=\"Overview Recently, for the first time, I encounter a need to use an interface in @RequestBody in my Spring Boot app. Here is the diagram: This is the request that contains one IAudioContent However, when I sent a request to create a question group with TTSSingleRequest in JSON format for example, I got the following ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\" \/>\n<meta property=\"og:site_name\" content=\"datmt\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-07T15:14:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-31T13:45:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"\u0110\u1ea1t Tr\u1ea7n\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0110\u1ea1t Tr\u1ea7n\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\"},\"author\":{\"name\":\"\u0110\u1ea1t Tr\u1ea7n\",\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"headline\":\"Using Interface In Spring Boot @RequestBody\",\"datePublished\":\"2023-06-07T15:14:17+00:00\",\"dateModified\":\"2023-07-31T13:45:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\"},\"wordCount\":236,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"image\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png\",\"keywords\":[\"jackson\",\"java\",\"spring boot\"],\"articleSection\":[\"java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\",\"url\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\",\"name\":\"Using Interface In Spring Boot @RequestBody - datmt\",\"isPartOf\":{\"@id\":\"https:\/\/datmt.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png\",\"datePublished\":\"2023-06-07T15:14:17+00:00\",\"dateModified\":\"2023-07-31T13:45:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage\",\"url\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png\",\"contentUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png\",\"width\":1280,\"height\":720,\"caption\":\"Using Interface In Spring Boot @RequestBody\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/datmt.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Interface In Spring Boot @RequestBody\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/datmt.com\/#website\",\"url\":\"https:\/\/datmt.com\/\",\"name\":\"datmt\",\"description\":\"Hands on projects\",\"publisher\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/datmt.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\",\"name\":\"\u0110\u1ea1t Tr\u1ea7n\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg\",\"contentUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u0110\u1ea1t Tr\u1ea7n\"},\"logo\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/image\/\"},\"description\":\"I build softwares that solve problems. I also love writing\/documenting things I learn\/want to learn.\",\"sameAs\":[\"https:\/\/datmt.com\"],\"url\":\"https:\/\/datmt.com\/author\/mtdat171_c\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Interface In Spring Boot @RequestBody - datmt","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/","og_locale":"en_US","og_type":"article","og_title":"Using Interface In Spring Boot @RequestBody - datmt","og_description":"Overview Recently, for the first time, I encounter a need to use an interface in @RequestBody in my Spring Boot app. Here is the diagram: This is the request that contains one IAudioContent However, when I sent a request to create a question group with TTSSingleRequest in JSON format for example, I got the following ... Read more","og_url":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/","og_site_name":"datmt","article_published_time":"2023-06-07T15:14:17+00:00","article_modified_time":"2023-07-31T13:45:05+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png","type":"image\/png"}],"author":"\u0110\u1ea1t Tr\u1ea7n","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u0110\u1ea1t Tr\u1ea7n","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#article","isPartOf":{"@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/"},"author":{"name":"\u0110\u1ea1t Tr\u1ea7n","@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"headline":"Using Interface In Spring Boot @RequestBody","datePublished":"2023-06-07T15:14:17+00:00","dateModified":"2023-07-31T13:45:05+00:00","mainEntityOfPage":{"@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/"},"wordCount":236,"commentCount":0,"publisher":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"image":{"@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage"},"thumbnailUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png","keywords":["jackson","java","spring boot"],"articleSection":["java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/","url":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/","name":"Using Interface In Spring Boot @RequestBody - datmt","isPartOf":{"@id":"https:\/\/datmt.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage"},"image":{"@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage"},"thumbnailUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png","datePublished":"2023-06-07T15:14:17+00:00","dateModified":"2023-07-31T13:45:05+00:00","breadcrumb":{"@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#primaryimage","url":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png","contentUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/06\/jackson-request-body.png","width":1280,"height":720,"caption":"Using Interface In Spring Boot @RequestBody"},{"@type":"BreadcrumbList","@id":"https:\/\/datmt.com\/backend\/java\/using-interface-in-spring-boot-requestbody\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/datmt.com\/"},{"@type":"ListItem","position":2,"name":"Using Interface In Spring Boot @RequestBody"}]},{"@type":"WebSite","@id":"https:\/\/datmt.com\/#website","url":"https:\/\/datmt.com\/","name":"datmt","description":"Hands on projects","publisher":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/datmt.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e","name":"\u0110\u1ea1t Tr\u1ea7n","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datmt.com\/#\/schema\/person\/image\/","url":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg","contentUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg","width":512,"height":512,"caption":"\u0110\u1ea1t Tr\u1ea7n"},"logo":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/image\/"},"description":"I build softwares that solve problems. I also love writing\/documenting things I learn\/want to learn.","sameAs":["https:\/\/datmt.com"],"url":"https:\/\/datmt.com\/author\/mtdat171_c\/"}]}},"_links":{"self":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/1778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/comments?post=1778"}],"version-history":[{"count":1,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/1778\/revisions"}],"predecessor-version":[{"id":1781,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/1778\/revisions\/1781"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/media\/1780"}],"wp:attachment":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/media?parent=1778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/categories?post=1778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/tags?post=1778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}