Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

jsend

A library used for generating Json String of JSend

Maven Central

Setting

Maven

<dependency>
  <groupId>work.jeong.murry.jsend</groupId>
  <artifactId>jsend</artifactId>
  <version>1.0</version>
</dependency>

Gradle

dependencies {
    implementation("work.jeong.murry.jsend", "jsend", "{latest_version}")
}

Usage

sucess

    JSend success = JSend.success();

or

    Pet pet = new Pet("moon");
    JSend success = JSend.success(pet);

error

    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);

fail

    Pet pet = new Pet("moon");
    JSend fail = JSend.fail(pet);