{"id":14518,"date":"2013-06-20T10:00:57","date_gmt":"2013-06-20T07:00:57","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=14518"},"modified":"2013-06-20T08:20:54","modified_gmt":"2013-06-20T05:20:54","slug":"moxys-xmlvariablenode-json-schema-example","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html","title":{"rendered":"MOXy&#8217;s @XmlVariableNode &#8211; JSON Schema Example"},"content":{"rendered":"<p>We are in the process of adding the ability to generate a <a href=\"http:\/\/json-schema.org\/\" target=\"_blank\">JSON Schema <\/a>from your domain model to <a href=\"http:\/\/www.eclipse.org\/eclipselink\/moxy.php\" target=\"_blank\">EclipseLink MOXy<\/a>.\u00a0 To accomplish this we have created a new Variable Node mapping. In this post I will demonstrate the new mapping by mapping a Java model to a JSON Schema.<\/p>\n<p>You can try this out today using a nightly build of EclipseLink 2.6.0:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.eclipse.org\/eclipselink\/downloads\/nightly.php\">http:\/\/www.eclipse.org\/eclipselink\/downloads\/nightly.php<\/a><\/li>\n<\/ul>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>JSON Schema (input.json\/Output)\u00a0<\/h2>\n<p>Below is the &#8220;Basic Example&#8221; taken from <a href=\"http:\/\/json-schema.org\/examples.html\" target=\"_blank\">http:\/\/json-schema.org\/examples.html<\/a>.\u00a0 Note how the type has many properties, but they don&#8217;t appear as a JSON array.\u00a0 Instead they appear as separate JSON objects keyed on the property name.<\/p>\n<pre class=\"brush: java; highlight: [5,8,11]\">{\r\n    \"title\": \"Example Schema\",\r\n    \"type\": \"object\",\r\n    \"properties\": {\r\n        \"firstName\": {\r\n            \"type\": \"string\"\r\n        },\r\n        \"lastName\": {\r\n            \"type\": \"string\"\r\n        },\r\n        \"age\": {\r\n            \"description\": \"Age in years\",\r\n            \"type\": \"integer\",\r\n            \"minimum\": 0\r\n        }\r\n    },\r\n    \"required\": [\"firstName\", \"lastName\"]\r\n}<\/pre>\n<h2>Java Model<\/h2>\n<p>Below is the Java model we will use for this example.<\/p>\n<h4>JsonSchema (Properties Stored in a List)<\/h4>\n<p>In this Java representation of the JSON Schema we have a class that has a collection of <i>Property<\/i> objects.\u00a0 Instead of the default representation of the collection (see:\u00a0 <a href=\"http:\/\/binding%20to%20json%20&amp;%20xml%20-%20handling%20collections\/\">Binding to JSON &amp; XML &#8211; Handling Collections<\/a>), we want each <i>Property<\/i> to be keyed by its <i>name<\/i>.\u00a0 We can do this using the <i>@XmlVariableNode<\/i> annotation.\u00a0 With it we specify the field\/property from the target object that should be used as the key.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush: java; highlight: [15,16]\">package blog.variablenode.jsonschema;\r\n\r\nimport java.util.*;\r\nimport javax.xml.bind.annotation.*;\r\nimport org.eclipse.persistence.oxm.annotations.XmlVariableNode;\r\n\r\n@XmlAccessorType(XmlAccessType.FIELD)\r\npublic class JsonSchema {\r\n\r\n    private String title;\r\n\r\n    private String type;\r\n\r\n    @XmlElementWrapper\r\n    @XmlVariableNode(\"name\")\r\n    public List&lt;Property&gt; properties;\r\n\r\n    private List&lt;String&gt; required;\r\n\r\n}<\/pre>\n<h4>JsonSchema (Properties Stored in a Map)<\/h4>\n<p>In this version of the <i>JsonSchema<\/i> class we have changed the type of <i>properties<\/i> property from <i>List&lt;Property&gt;<\/i> property to <i>Map&lt;String, Property&gt;<\/i>.\u00a0 The annotation remains the same, the difference is that when <i>@XmlVariableNode<\/i> is used on a <i>Map<\/i> the variable node name is used as the map key.<\/p>\n<pre class=\"brush: java; highlight: [15,16]\">package blog.variablenode.jsonschema;\r\n\r\nimport java.util.*;\r\nimport javax.xml.bind.annotation.*;\r\nimport org.eclipse.persistence.oxm.annotations.XmlVariableNode;\r\n\r\n@XmlAccessorType(XmlAccessType.FIELD)\r\npublic class JsonSchema {\r\n\r\n    private String title;\r\n\r\n    private String type;\r\n\r\n    @XmlElementWrapper\r\n    @XmlVariableNode(\"name\")\r\n    public Map&lt;String, Property&gt; properties;\r\n\r\n    private List&lt;String&gt; required;\r\n\r\n}<\/pre>\n<h4>Property<\/h4>\n<p>To prevent the name field from being marshalled we need to annotate it with <i>@XmlTransient <\/i>(see <a href=\"http:\/\/blog.bdoughan.com\/2012\/04\/jaxb-and-unmapped-properties.html\">JAXB and Unmapped Properties<\/a>).<\/p>\n<pre class=\"brush: java; highlight: [8,9]\">package blog.variablenode.jsonschema;\r\n\r\nimport javax.xml.bind.annotation.*;\r\n\r\n@XmlAccessorType(XmlAccessType.FIELD)\r\npublic class Property {\r\n\r\n    @XmlTransient\r\n    private String name;\r\n\r\n    private String description;\r\n\r\n    private String type;\r\n\r\n    private Integer minimum;\r\n\r\n}<\/pre>\n<h2>Demo Code<\/h2>\n<p>Below is some sample code that you can use to prove that everything works.<\/p>\n<pre class=\"brush: java; highlight: [12,13]\">package blog.variablenode.jsonschema;\r\n\r\nimport java.util.*;\r\nimport javax.xml.bind.*;\r\nimport javax.xml.transform.stream.StreamSource;\r\nimport org.eclipse.persistence.jaxb.JAXBContextProperties;\r\n\r\npublic class Demo {\r\n\r\n    public static void main(String[] args) throws Exception {\r\n        Map&lt;String, Object&gt; properties = new HashMap&lt;String, Object&gt;();\r\n        properties.put(JAXBContextProperties.MEDIA_TYPE, \"application\/json\");\r\n        properties.put(JAXBContextProperties.JSON_INCLUDE_ROOT, false);\r\n        JAXBContext jc = JAXBContext.newInstance(new Class[] {JsonSchema.class}, properties);\r\n\r\n        Unmarshaller unmarshaller = jc.createUnmarshaller();\r\n        StreamSource json = new StreamSource(\"src\/blog\/variablenode\/jsonschema\/input.json\");\r\n        JsonSchema jsonSchema = unmarshaller.unmarshal(json, JsonSchema.class).getValue();\r\n\r\n        Marshaller marshaller = jc.createMarshaller();\r\n        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\r\n        marshaller.marshal(jsonSchema, System.out);\r\n    }\r\n\r\n}<\/pre>\n<h2>External Metadata<\/h2>\n<p>MOXy also offers an external mapping document which allows you to provide metadata for third party objects or apply alternate mappings for your model (see: <a href=\"http:\/\/blog.bdoughan.com\/2011\/09\/mapping-objects-to-multiple-xml-schemas.html\">Mapping Object to Multiple XML Schemas &#8211; Weather Example<\/a>).\u00a0 Below is the mapping document for this example.<\/p>\n<pre class=\"brush: java; highlight: [9,10,11,12]\">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;xml-bindings\r\n    xmlns=\"http:\/\/www.eclipse.org\/eclipselink\/xsds\/persistence\/oxm\"\r\n    package-name=\"blog.variablenode.jsonschema\"\r\n    xml-accessor-type=\"FIELD\"&gt;\r\n    &lt;java-types&gt;\r\n        &lt;java-type name=\"JsonSchema\"&gt;\r\n            &lt;java-attributes&gt;\r\n                &lt;xml-variable-node \r\n                    java-attribute=\"properties\" java-variable-attribute=\"name\"&gt;\r\n                    &lt;xml-element-wrapper\/&gt;\r\n                &lt;\/xml-variable-node&gt;\r\n            &lt;\/java-attributes&gt;\r\n        &lt;\/java-type&gt;\r\n        &lt;java-type name=\"Property\"&gt;\r\n            &lt;java-attributes&gt;\r\n                &lt;xml-transient java-attribute=\"name\"\/&gt;\r\n            &lt;\/java-attributes&gt;\r\n        &lt;\/java-type&gt;\r\n    &lt;\/java-types&gt;\r\n&lt;\/xml-bindings&gt;<\/pre>\n<p>&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/blog.bdoughan.com\/2013\/06\/moxys-xmlvariablenode-json-schema.html\">MOXy&#8217;s @XmlVariableNode &#8211; JSON Schema Example<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Blaise Doughan at the <a href=\"http:\/\/blog.bdoughan.com\/\">Java XML &amp; JSON Binding<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.\u00a0 To accomplish this we have created a new Variable Node mapping. In this post I will demonstrate the new mapping by mapping a Java model to a JSON Schema. You can try this out &hellip;<\/p>\n","protected":false},"author":51,"featured_media":175,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[69,729,107],"class_list":["post-14518","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-json","tag-moxy","tag-xml"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MOXy&#039;s @XmlVariableNode - JSON Schema Example<\/title>\n<meta name=\"description\" content=\"We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.\u00a0 To accomplish this we have created a\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MOXy&#039;s @XmlVariableNode - JSON Schema Example\" \/>\n<meta property=\"og:description\" content=\"We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.\u00a0 To accomplish this we have created a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-06-20T07:00:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/json-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Blaise Doughan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/bdoughan\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Blaise Doughan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html\"},\"author\":{\"name\":\"Blaise Doughan\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/aa63986b9b274cb85d2c6ea9d73bfda8\"},\"headline\":\"MOXy&#8217;s @XmlVariableNode &#8211; JSON Schema Example\",\"datePublished\":\"2013-06-20T07:00:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html\"},\"wordCount\":378,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/json-logo.jpg\",\"keywords\":[\"JSON\",\"MOXy\",\"XML\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html\",\"name\":\"MOXy's @XmlVariableNode - JSON Schema Example\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/json-logo.jpg\",\"datePublished\":\"2013-06-20T07:00:57+00:00\",\"description\":\"We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.\u00a0 To accomplish this we have created a\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/json-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/json-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/moxys-xmlvariablenode-json-schema-example.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"MOXy&#8217;s @XmlVariableNode &#8211; JSON Schema Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/aa63986b9b274cb85d2c6ea9d73bfda8\",\"name\":\"Blaise Doughan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/375230a428542e375a6e404b30a2d5620afc3aadb16e21d1268227def78b3703?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/375230a428542e375a6e404b30a2d5620afc3aadb16e21d1268227def78b3703?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/375230a428542e375a6e404b30a2d5620afc3aadb16e21d1268227def78b3703?s=96&d=mm&r=g\",\"caption\":\"Blaise Doughan\"},\"description\":\"Team lead for the TopLink\\\/EclipseLink JAXB &amp; SDO implementations, and the Oracle representative on those specifications.\",\"sameAs\":[\"http:\\\/\\\/blog.bdoughan.com\\\/\",\"http:\\\/\\\/ca.linkedin.com\\\/in\\\/bdoughan\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/bdoughan\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/blaise-doughan\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MOXy's @XmlVariableNode - JSON Schema Example","description":"We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.\u00a0 To accomplish this we have created a","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:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html","og_locale":"en_US","og_type":"article","og_title":"MOXy's @XmlVariableNode - JSON Schema Example","og_description":"We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.\u00a0 To accomplish this we have created a","og_url":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-06-20T07:00:57+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/json-logo.jpg","type":"image\/jpeg"}],"author":"Blaise Doughan","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/bdoughan","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Blaise Doughan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html"},"author":{"name":"Blaise Doughan","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/aa63986b9b274cb85d2c6ea9d73bfda8"},"headline":"MOXy&#8217;s @XmlVariableNode &#8211; JSON Schema Example","datePublished":"2013-06-20T07:00:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html"},"wordCount":378,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/json-logo.jpg","keywords":["JSON","MOXy","XML"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html","url":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html","name":"MOXy's @XmlVariableNode - JSON Schema Example","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/json-logo.jpg","datePublished":"2013-06-20T07:00:57+00:00","description":"We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.\u00a0 To accomplish this we have created a","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/json-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/json-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/moxys-xmlvariablenode-json-schema-example.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"MOXy&#8217;s @XmlVariableNode &#8211; JSON Schema Example"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/aa63986b9b274cb85d2c6ea9d73bfda8","name":"Blaise Doughan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/375230a428542e375a6e404b30a2d5620afc3aadb16e21d1268227def78b3703?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/375230a428542e375a6e404b30a2d5620afc3aadb16e21d1268227def78b3703?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/375230a428542e375a6e404b30a2d5620afc3aadb16e21d1268227def78b3703?s=96&d=mm&r=g","caption":"Blaise Doughan"},"description":"Team lead for the TopLink\/EclipseLink JAXB &amp; SDO implementations, and the Oracle representative on those specifications.","sameAs":["http:\/\/blog.bdoughan.com\/","http:\/\/ca.linkedin.com\/in\/bdoughan","https:\/\/x.com\/http:\/\/twitter.com\/bdoughan"],"url":"https:\/\/www.javacodegeeks.com\/author\/blaise-doughan"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/14518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=14518"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/14518\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/175"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=14518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=14518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=14518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}