diff --git a/src/main/java/com/esri/core/geometry/GeometryEngine.java b/src/main/java/com/esri/core/geometry/GeometryEngine.java index 99466fd2..83db0e53 100644 --- a/src/main/java/com/esri/core/geometry/GeometryEngine.java +++ b/src/main/java/com/esri/core/geometry/GeometryEngine.java @@ -44,6 +44,7 @@ public class GeometryEngine { /** + * @deprecated String * Imports the MapGeometry from its JSON representation. M and Z values are * not imported from JSON representation. * @@ -55,6 +56,7 @@ public class GeometryEngine { * @return The MapGeometry instance containing the imported geometry and its * spatial reference. */ + @Deprecated public static MapGeometry jsonToGeometry(JsonParser json) { MapGeometry geom = OperatorImportFromJson.local().execute(Geometry.Type.Unknown, new JsonParserReader(json)); return geom; @@ -95,11 +97,11 @@ public static MapGeometry jsonToGeometry(String json) { } /** - * Exports the specified geometry instance to it's JSON representation. + * Exports the specified geometry instance to its JSON representation. * * See OperatorExportToJson. * - * @see GeometryEngine#geometryToJson(SpatialReference spatialiReference, + * @see GeometryEngine#geometryToJson(SpatialReference spatialReference, * Geometry geometry) * @param wkid * The spatial reference Well Known ID to be used for the JSON @@ -114,7 +116,7 @@ public static String geometryToJson(int wkid, Geometry geometry) { } /** - * Exports the specified geometry instance to it's JSON representation. M + * Exports the specified geometry instance to its JSON representation. M * and Z values are not imported from JSON representation. * * See OperatorExportToJson. @@ -177,7 +179,7 @@ public static String geometryToGeoJson(int wkid, Geometry geometry) { } /** - * Exports the specified geometry instance to it's JSON representation. + * Exports the specified geometry instance to its JSON representation. * * See OperatorImportFromGeoJson. * diff --git a/src/main/java/com/esri/core/geometry/JsonParserReader.java b/src/main/java/com/esri/core/geometry/JsonParserReader.java index 90427c63..bce83af4 100644 --- a/src/main/java/com/esri/core/geometry/JsonParserReader.java +++ b/src/main/java/com/esri/core/geometry/JsonParserReader.java @@ -34,6 +34,7 @@ public class JsonParserReader implements JsonReader { private JsonParser m_jsonParser; + @Deprecated public JsonParserReader(JsonParser jsonParser) { m_jsonParser = jsonParser; } @@ -46,7 +47,7 @@ public static JsonReader createFromString(String str) { try { JsonFactory factory = new JsonFactory(); JsonParser jsonParser = factory.createParser(str); - + jsonParser.nextToken(); return new JsonParserReader(jsonParser); } @@ -168,4 +169,3 @@ else if (t == Token.VALUE_FALSE) throw new JsonGeometryException("Not a boolean"); } } - diff --git a/src/main/java/com/esri/core/geometry/SpatialReference.java b/src/main/java/com/esri/core/geometry/SpatialReference.java index 4c337e27..0cf8294a 100644 --- a/src/main/java/com/esri/core/geometry/SpatialReference.java +++ b/src/main/java/com/esri/core/geometry/SpatialReference.java @@ -74,6 +74,7 @@ boolean isLocal() { } /** + * @deprecated String * Returns spatial reference from the JsonParser. * * @param parser @@ -83,6 +84,7 @@ boolean isLocal() { * @throws Exception * if parsing has failed */ + @Deprecated public static SpatialReference fromJson(JsonParser parser) throws Exception { return fromJson(new JsonParserReader(parser)); }