- java.lang.Object
-
- com.gluonhq.cloudlink.client.user.UserUtil
-
public class UserUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description UserUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static User
fromJson(javax.json.JsonObject json)
Generate a new User instance by loading the fields from the provided JSON object.static javax.json.JsonObject
toJson(User user)
Converts this User instance to an immutable JSON object.
-
-
-
Method Detail
-
fromJson
public static User fromJson(javax.json.JsonObject json)
Generate a new User instance by loading the fields from the provided JSON object.- Parameters:
json
- a JSON object that contains the user information- Returns:
- A new User instance.
-
toJson
public static javax.json.JsonObject toJson(User user)
Converts this User instance to an immutable JSON object.- Parameters:
user
- a User instance to convert into JSON- Returns:
- A JSON object containing information of this user.
-
-