Skip to content

Commit cec096a

Browse files
Fixed serialize and deserialize json
1 parent 5f1d67c commit cec096a

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/main/java/com/groupdocs/cloud/annotation/model/AnnotationInfo.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ public static TypeEnum fromValue(String text) {
129129
return b;
130130
}
131131
}
132+
try {
133+
int i = Integer.parseInt(text);
134+
return TypeEnum.values()[i];
135+
}
136+
catch (Exception ex){
137+
}
132138
return null;
133139
}
134140

@@ -179,6 +185,12 @@ public static AccessEnum fromValue(String text) {
179185
return b;
180186
}
181187
}
188+
try {
189+
int i = Integer.parseInt(text);
190+
return AccessEnum.values()[i];
191+
}
192+
catch (Exception ex){
193+
}
182194
return null;
183195
}
184196

src/main/java/com/groupdocs/cloud/annotation/model/Point.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
* Point
4343
*/
4444
public class Point extends ValueType {
45-
@SerializedName("X")
45+
@SerializedName("x")
4646
private Double X = null;
4747

48-
@SerializedName("Y")
48+
@SerializedName("y")
4949
private Double Y = null;
5050

5151
public Point (Double x, Double y) {

src/main/java/com/groupdocs/cloud/annotation/model/Rectangle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
* Rectangle
4343
*/
4444
public class Rectangle extends ValueType {
45-
@SerializedName("X")
45+
@SerializedName("x")
4646
private Double X = null;
4747

48-
@SerializedName("Y")
48+
@SerializedName("y")
4949
private Double Y = null;
5050

5151
@SerializedName("width")

0 commit comments

Comments
 (0)