Skip to content

Commit 814a6cd

Browse files
committed
add getBigDecimal and getBitInteger methods.
1 parent f820045 commit 814a6cd

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ To install the library add:
1515
maven { url "https://jitpack.io" }
1616
}
1717
dependencies {
18-
compile 'com.github.webee:java-json-api:v1.3.1'
18+
compile 'com.github.webee:java-json-api:v1.4.0'
1919
}
2020
```

src/main/java/com/github/webee/json/JSONArray.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.github.webee.json;
22

3+
import java.math.BigDecimal;
4+
import java.math.BigInteger;
5+
36
/**
47
* Created by webee on 16/11/25.
58
*/
@@ -12,9 +15,11 @@ public interface JSONArray {
1215
Object[] get();
1316
Object get(int index);
1417
Boolean getBoolean(int index);
18+
BigDecimal getBigDecimal(int index);
19+
BigInteger getBigInteger(int index);
20+
Double getDouble(int index);
1521
Integer getInteger(int index);
1622
Long getLong(int index);
17-
Double getDouble(int index);
1823
String getString(int index);
1924
JSONArray getArray(int index);
2025
JSONObject getObject(int index);

src/main/java/com/github/webee/json/JSONObject.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.github.webee.json;
22

3+
import java.math.BigDecimal;
4+
import java.math.BigInteger;
35
import java.util.Map;
46
import java.util.Set;
57

@@ -16,9 +18,11 @@ public interface JSONObject {
1618
Map<String, Object> get();
1719
Object get(String key);
1820
Boolean getBoolean(String key);
21+
BigDecimal getBigDecimal(String key);
22+
BigInteger getBigInteger(String key);
23+
Double getDouble(String key);
1924
Integer getInteger(String key);
2025
Long getLong(String key);
21-
Double getDouble(String key);
2226
String getString(String key);
2327
JSONArray getArray(String key);
2428
JSONObject getObject(String key);

0 commit comments

Comments
 (0)