A library used for generating Json String of JSend
<dependency>
<groupId>work.jeong.murry.jsend</groupId>
<artifactId>jsend</artifactId>
<version>1.0</version>
</dependency>
dependencies {
implementation("work.jeong.murry.jsend", "jsend", "{latest_version}")
}
JSend success = JSend.success();
or
Pet pet = new Pet("moon");
JSend success = JSend.success(pet);
JSend error = JSend.error("It has been occurred an error.");
or
Pet pet = new Pet("moon");
JSend error = JSend.error(500, "It has been occurred an error.", pet);
Pet pet = new Pet("moon");
JSend fail = JSend.fail(pet);