{"id":4903,"date":"2011-12-29T23:17:16","date_gmt":"2011-12-29T17:47:16","guid":{"rendered":"https:\/\/2thenew.today\/blog\/?p=4903"},"modified":"2011-12-29T23:19:11","modified_gmt":"2011-12-29T17:49:11","slug":"grails-custom-data-binding-in-3-simple-steps","status":"publish","type":"post","link":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/","title":{"rendered":"Grails Custom Data Binding in 3 Simple Steps"},"content":{"rendered":"<p>The other day, <a href=\"https:\/\/2thenew.today\/blog\/author\/farid\/\" target=\"_blank\">Farid<\/a> came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this<a href=\"http:\/\/stackoverflow.com\/questions\/2871977\/binding-a-grails-date-from-params-in-a-controller\" target=\"_blank\"> StackOverflow thread<\/a>.<\/p>\n<p>This set me thinking into using a CustomProperty Editor for, say a Cost object, which could contain a unit and an amount<\/p>\n<p>[java]<\/p>\n<p>class Cost{<\/p>\n<p>String unit \/\/Could be constrained to belong to some range of values<\/p>\n<p>BigDecimal amount<\/p>\n<p>}<\/p>\n<p>[\/java]<\/p>\n<p>I was able to solve this issue in 3 simple steps which I would like to share with you. I felt that this would take a lesser amount of time compared to the Extended Data Binding Plugin(my gut feeling)<\/p>\n<p><strong>1. Add a CustomCostEditor to src\/groovy<\/strong><\/p>\n<p>[java]<\/p>\n<p>import java.beans.PropertyEditorSupportimport org.springframework.util.StringUtils<br \/>\nclass CustomCostEditor extends PropertyEditorSupport {\u00a0 \u00a0 private final boolean allowEmpty<br \/>\n        CustomCostEditor(boolean allowEmpty) {<br \/>\n               this.allowEmpty = allowEmpty<br \/>\n        }<br \/>\n        @Override<br \/>\n        void setAsText(String text) {<br \/>\n               if (this.allowEmpty &amp;&amp; !StringUtils.hasText(text)) {<br \/>\n                     \/\/ Treat empty String as null value.<br \/>\n                     setValue(null);<br \/>\n               } else {<br \/>\n                      setValue(parse(text))<br \/>\n               }<br \/>\n        }<br \/>\n        @Override<br \/>\n        String getAsText() {<br \/>\n                Cost cost = (Cost) getValue()<br \/>\n                return &quot;${cost.unit} ${cost.amount}&quot;<br \/>\n        }<br \/>\n       Cost parse(String text){<br \/>\n                try{<br \/>\n                     new Cost(unit: text.substring(0, text.indexOf(&quot; &quot;)), amount: text.substring(text.indexOf(&quot; &quot;) + 1).toBigDecimal())<br \/>\n                } catch(Exception exception){<br \/>\n                     throw new IllegalArgumentException(&quot;Cost should be of the format &#8216;Unit Amount&#8217;&quot;)<br \/>\n                }<br \/>\n       }<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>The methods which we need to override are setAsText() and getAsText()<br \/>\n<strong> 2. Add a CustomPropertyEditorRegistrar class, which has a registerCustomEditorMethods<\/strong><\/p>\n<p>[java]<br \/>\nimport org.springframework.beans.PropertyEditorRegistrar<br \/>\nimport org.springframework.beans.PropertyEditorRegistry<\/p>\n<p>class CustomPropertyEditorRegistrar implements PropertyEditorRegistrar{<br \/>\n    public void registerCustomEditors(PropertyEditorRegistry registry) {<br \/>\n        registry.registerCustomEditor(Cost.class, new com.intelligrape.example.CustomCostEditor(true));<br \/>\n    }<br \/>\n}<br \/>\n[\/java]<\/p>\n<p><strong>3. Add a spring bean to add an instance of this custom property editor registrar<\/strong><br \/>\nFinally, we create a spring bean by adding the following line in resources.groovy<\/p>\n<p>[java]<br \/>\nbeans = {<br \/>\n    customPropertyEditorRegistrar(CustomPropertyEditorRegistrar)<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>Now, assuming that we have an embedded field cost of type Cost in a domain class Item, we can simply use<\/p>\n<p>[html]<br \/>\n&lt;input type=&quot;text&quot; name=&quot;cost&quot; value=&quot;${fieldValue(bean: item, field:&#8217;cost&#8217;)}&quot;\/&gt;<br \/>\n[\/html]<\/p>\n<p>and input <strong>&#8220;$ 123&#8221;<\/strong> to store <strong>$<\/strong> in the <strong>cost.unit<\/strong> and <strong>123<\/strong> in the <strong>cost.amount<\/strong>.<\/p>\n<p>I believe that the possibilities with such an approach are infinite!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":21,"footnotes":""},"categories":[7],"tags":[733,735,734,664],"class_list":["post-4903","post","type-post","status-publish","format-standard","hentry","category-grails","tag-custom-data-binding","tag-custom-property-editor","tag-custom-property-registrar","tag-data-binding"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vivek Krishna\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#article\",\"name\":\"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog\",\"headline\":\"Grails Custom Data Binding in 3 Simple Steps\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-12-29T23:17:16+05:30\",\"dateModified\":\"2011-12-29T23:19:11+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#webpage\"},\"articleSection\":\"Grails, custom data binding, custom property editor, custom property registrar, data binding\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#listItem\",\"name\":\"Grails Custom Data Binding in 3 Simple Steps\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#listItem\",\"position\":3,\"name\":\"Grails Custom Data Binding in 3 Simple Steps\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/\",\"name\":\"Vivek Krishna\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07dba643a97b00215bacf46343f18d6cb7ab45f777264e13c22deb54f2cc830b?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vivek Krishna\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/\",\"name\":\"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog\",\"description\":\"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-custom-data-binding-in-3-simple-steps\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"datePublished\":\"2011-12-29T23:17:16+05:30\",\"dateModified\":\"2011-12-29T23:19:11+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog","description":"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty","canonical_url":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#article","name":"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog","headline":"Grails Custom Data Binding in 3 Simple Steps","author":{"@id":"https:\/\/2thenew.today\/blog\/author\/vivek\/#author"},"publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"},"datePublished":"2011-12-29T23:17:16+05:30","dateModified":"2011-12-29T23:19:11+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#webpage"},"articleSection":"Grails, custom data binding, custom property editor, custom property registrar, data binding"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.today\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/2thenew.today\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#listItem","name":"Grails Custom Data Binding in 3 Simple Steps"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#listItem","position":3,"name":"Grails Custom Data Binding in 3 Simple Steps","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.today\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.today\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.today\/blog\/author\/vivek\/#author","url":"https:\/\/2thenew.today\/blog\/author\/vivek\/","name":"Vivek Krishna","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/07dba643a97b00215bacf46343f18d6cb7ab45f777264e13c22deb54f2cc830b?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vivek Krishna"}},{"@type":"WebPage","@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#webpage","url":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/","name":"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog","description":"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.today\/blog\/author\/vivek\/#author"},"creator":{"@id":"https:\/\/2thenew.today\/blog\/author\/vivek\/#author"},"datePublished":"2011-12-29T23:17:16+05:30","dateModified":"2011-12-29T23:19:11+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.today\/blog\/#website","url":"https:\/\/2thenew.today\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog","og:description":"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty","og:url":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/","og:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Grails Custom Data Binding in 3 Simple Steps | TO THE NEW Blog","twitter:description":"The other day, Farid came with an interesting problem of binding a Time String to java.sql.Time. We straight away found the answer in using a CustomTimeEditor and registering it using a CustomPropertyEditorRegistrar bean. We were able to come arrive at this solution, thanks to this StackOverflow thread. This set me thinking into using a CustomProperty","twitter:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"4903","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 14:56:42","updated":"2024-02-29 09:26:22","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tGrails Custom Data Binding in 3 Simple Steps\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.today\/blog"},{"label":"Grails","link":"https:\/\/2thenew.today\/blog\/category\/grails\/"},{"label":"Grails Custom Data Binding in 3 Simple Steps","link":"https:\/\/2thenew.today\/blog\/grails-custom-data-binding-in-3-simple-steps\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/4903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/comments?post=4903"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/4903\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/media?parent=4903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/categories?post=4903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/tags?post=4903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}