public final class JsonImageDetectionDecoder extends Object
StreetsideURL.APIv3
into Java objects.
Takes a JsonObject
and decodeImageDetection(JsonObject)
tries to convert it to a ImageDetection
.Modifier | Constructor and Description |
---|---|
private |
JsonImageDetectionDecoder() |
Modifier and Type | Method and Description |
---|---|
static ImageDetection |
decodeImageDetection(javax.json.JsonObject json) |
private static Path2D |
decodePolygon(javax.json.JsonArray json)
Decodes a polygon (may be a multipolygon) from JSON
|
private static Shape |
decodeShape(javax.json.JsonValue json) |
private static Path2D |
decodeSimplePolygon(javax.json.JsonArray json)
Decodes a simple polygon (consisting of only one continuous path) from JSON
|
private JsonImageDetectionDecoder()
public static ImageDetection decodeImageDetection(javax.json.JsonObject json)
private static Shape decodeShape(javax.json.JsonValue json)
private static Path2D decodePolygon(javax.json.JsonArray json)
json
- the json array to decode, must not be null
Path2D.Double
private static Path2D decodeSimplePolygon(javax.json.JsonArray json)
json
- the json array to decode, must not be null
Path2D.Double
NullPointerException
- if parameter is null