Export to GitHub

json-simple - issue #93

JSONObject produces warning in code


Posted on Dec 16, 2013 by Grumpy Wombat

When using JSONObject, we get the following warning:

Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be parameterized

(see http://stackoverflow.com/q/2646613/344286 http://stackoverflow.com/q/16415436/344286 )

It would be a good thing if JSONObject would implement HashMap<K, V> so we don't have to wrap code in a warning suppression or write an adapter.

Comment #1

Posted on Dec 19, 2013 by Helpful Panda

(No comment was entered for this change.)

Comment #2

Posted on Mar 11, 2014 by Happy Ox

Comment deleted

Comment #3

Posted on Mar 11, 2014 by Happy Ox

Please include JSONArray, this would fix the bulk of them.

Comment #4

Posted on Apr 29, 2014 by Helpful Panda

Comment deleted

Comment #5

Posted on Apr 29, 2014 by Helpful Panda

I'm including all of org.json.simple.* from the jar (includes org.json.simple.JSONArray) and am getting the type safety warning outlined above.

Comment #6

Posted on Jan 29, 2015 by Happy Camel

is this fixed ? if yes, then can you please point me to the release version for same ?

Status: Accepted

Labels:
Type-Enhancement Priority-Medium