We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3270c2f commit fa5ecfaCopy full SHA for fa5ecfa
1 file changed
json/src/main/java/alpine/json/ObjectElement.java
@@ -74,27 +74,27 @@ public int length() {
74
}
75
76
public byte getByte(String key) {
77
- return (byte) this.getNumber(key, 0);
+ return this.getNumber(key, 0).byteValue();
78
79
80
public short getShort(String key) {
81
- return (short) this.getNumber(key, 0);
+ return this.getNumber(key, 0).shortValue();
82
83
84
public int getInteger(String key) {
85
- return (int) this.getNumber(key, 0);
+ return this.getNumber(key, 0).intValue();
86
87
88
public long getLong(String key) {
89
- return (long) this.getNumber(key, 0);
+ return this.getNumber(key, 0).longValue();
90
91
92
public float getFloat(String key) {
93
- return (float) this.getNumber(key, 0.0F);
+ return this.getNumber(key, 0.0F).floatValue();
94
95
96
public double getDouble(String key) {
97
- return (double) this.getNumber(key, 0.0D);
+ return this.getNumber(key, 0.0D).doubleValue();
98
99
100
public @Nullable Boolean getBoolean(String key) {
0 commit comments