1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00
Commit graph

27 commits

Author SHA1 Message Date
stleary
8688494876 change to public, write(writer, indentfactor, indent) 2015-12-23 19:53:30 -06:00
Sean Leary
a109f581c8 Update JSONArray.java
Update version for https://github.com/douglascrockford/JSON-java/pull/153
2015-10-29 18:25:27 -05:00
Lukas Treyer
25b5aa7ef2 changed Map<String, ?> method parameters to Map<?,?>
changed Iterator to foreach loop in JSONArray ctor
JSONArray(Collection<?> collection) and JSONObject ctor
JSONObject(Map<?,?> map)
2015-10-11 12:21:12 +02:00
Lukas Treyer
409eb9f292 changed all method signatures containing collections and maps to accept
wildcard generic types, e.g. Collection<?> instead of
Collection<Object>. This was proposed by other pull requests (#111,
#112) already. Consider this commit as merge with #111 and #112.

JSONArray:
	- put(Collection<?> value) {...}
	- put(Map<String, ?> value) {...}
	- put(int index, Collection<?> value) throws JSONException {...}
	- put(int index, Map<String, ?> value) throws JSONException {...}

JSONObject:
	- put(String key, Collection<?> value) throws JSONException {...}
	- put(String key, Map<String, ?> value) throws JSONException {...}


Changed all code affected by new JSONObject and JSONArray constructors:
	
JSONObject:
	- valueToString(Object value) throws JSONException {
		- value instanceof Map
		- value instanceof Collection
	  }
	- wrap(Object object) {
		- value instanceof Map
		- value instanceof Collection
	  }
	- writeValue(Writer writer, Object value,
			 int indentFactor, int indent){
        - value instanceof Map
        - value instanceof Collection
      }
2015-10-11 11:20:08 +02:00
Lukas Treyer
0afd26623c JSONObject and JSONArray initialization:
JSONObject(Map<String, ?> map) allows to initialize the JSONObject with
a Map<String, String>

JSONArray(Collection<?> collection) allows to initialize a JSONArray
with a Collection<JSONObject>
2015-10-04 23:17:30 +02:00
stleary
5fc22e32a8 fix edit dates for enum support 2015-07-22 20:18:30 -05:00
stleary
9785b4ff0b enum support 2015-07-22 20:16:02 -05:00
stleary
ca3001629a latest 2015-07-22 20:11:07 -05:00
stleary
71d9ad2b99 update version dates 2015-07-06 22:27:10 -05:00
stleary
410afaff14 latest 2015-07-06 22:20:19 -05:00
stleary
6ab6f063c8 latest 2015-07-03 20:41:47 -05:00
stleary
d2cd1a8df5 iterable 2015-06-04 22:26:16 -05:00
Douglas Crockford
a9a0762383 Java 1.8. 2014-05-05 15:09:32 -07:00
Douglas Crockford
7ff3fa4e40 similar 2014-04-21 16:11:51 -07:00
Douglas Crockford
cdaaf12557 JSONArray.remove 2014-04-18 16:16:03 -07:00
Douglas Crockford
a360c40b74 Disallow ; and => 2013-04-19 11:09:16 -07:00
Douglas Crockford
b883a848a6 backout 2013-02-19 18:26:31 -08:00
Douglas Crockford
ae8d12c5f4 iterator 2013-02-19 04:49:21 -08:00
Douglas Crockford
216a4299f3 toString 2012-11-13 14:26:15 -08:00
Douglas Crockford
9115ada84d Performance improvments by Valentin Valchev 2012-04-22 16:52:45 -07:00
unknown
6394d92279 optString 2011-12-19 17:31:55 -08:00
Douglas Crockford
806900e0d1 Remove 0x- 2011-11-24 07:45:34 -08:00
Douglas Crockford
5a4fb657a8 JSONArray.optString when NULL 2011-08-25 08:52:30 -07:00
Douglas Crockford
f4cb14728f .getString(...) now throws if there is no property or if it is not a string 2011-05-09 10:08:10 -07:00
Douglas Crockford
449641a01e getString("null") 2010-12-28 06:23:18 -08:00
Douglas Crockford
87c4b1d59d Season's Greetings 2010-12-25 14:12:07 -08:00
Douglas Crockford
667813de3c first commit 2010-12-21 10:51:19 -08:00