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 protected
JsonUtilities()
Does nothing but denies direct instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Instant
toInstant(JsonString string)
Converts a JSON date-time string to an instant.static Link
toLink(JsonObject object)
Converts a JSON object to a link.static UUID
toUUID(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:
Instant
object ifstring
is notnull
,null
otherwise
-
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:
UUID
object ifstring
is notnull
,null
otherwise
-
toLink
public static Link toLink(JsonObject object)
Converts a JSON object to a link.- Parameters:
object
- JSON object, ornull
.- Returns:
Link
object ifobject
represents a valid link;null
otherwise.
-
-