JsonPatch is a format for storing a sequence of operations that has to be applied on the target json structure. The following operations can be stored in JsonPath and operated on json structure 1) add 2) remove 3) replace 4) move 5) copy 6) test Java jdk provides api for creating JsonPatch. The post explains…… Continue reading Simple JsonPatch Example
Month: November 2017
Creating and executing task
Gradle is domain specific language where the domain in this case is automating application build process. Gradle consists of Projects and Tasks. Each project has multiple Tasks and each Task has multiple actions. In this post I will explain how to create and execute task. Create a file by name build.gradle with the below code…… Continue reading Creating and executing task
Marshaling a property as xml attribute
By default when marshaling to xml file, all properties are marshaled as elements. This default behaviour can be changed and this post explains how to do it. In this post I will marshall the below java bean class, and id property as its attribute. Country 1 package package1; 2 3 import javax.xml.bind.annotation.XmlAttribute; 4 import javax.xml.bind.annotation.XmlRootElement;…… Continue reading Marshaling a property as xml attribute