Package org.vx68k.bitbucket.api.client
Class JsonUtilities
- java.lang.Object
-
- org.vx68k.bitbucket.api.client.JsonUtilities
-
public class JsonUtilities extends Object
Collection of static utility methods.- Since:
- 5.0
- Author:
- Kaz Nishimura
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsonUtilities()Does nothing but denies direct instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InstanttoInstant(JsonString string)Converts a JSON date-time string to an instant.static LinktoLink(JsonObject object)Converts a JSON object to a link.static UUIDtoUUID(JsonString string)Converts a JSON string to a UUID.
-
-
-
Method Detail
-
toInstant
public static Instant toInstant(JsonString string)
Converts a JSON date-time string to an instant. The date-time string may have a time offset.- Parameters:
string- JSON date-time string, ornull- Returns:
Instantobject ifstringis notnull,nullotherwise
-
toUUID
public static UUID toUUID(JsonString string)
Converts a JSON string to a UUID. The string may enclose a UUID in a pair of braces.- Parameters:
string- JSON string, ornull- Returns:
UUIDobject ifstringis notnull,nullotherwise
-
toLink
public static Link toLink(JsonObject object)
Converts a JSON object to a link.- Parameters:
object- JSON object, ornull.- Returns:
Linkobject ifobjectrepresents a valid link;nullotherwise.
-
-