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

Update JSONObject.java

Fixed some typos committed in #249, since reverted, tracking issue is #263
This commit is contained in:
Sean Leary 2016-08-15 01:58:54 -05:00 committed by GitHub
parent f96f505188
commit 7232a95c0b

View file

@ -93,7 +93,7 @@ import java.util.Set;
* </ul> * </ul>
* *
* @author JSON.org * @author JSON.org
* @version 2016-05-20 * @version 2016-08-15
*/ */
public class JSONObject { public class JSONObject {
/** /**
@ -132,6 +132,7 @@ public class JSONObject {
* *
* @return The string "null". * @return The string "null".
*/ */
@Override
public String toString() { public String toString() {
return "null"; return "null";
} }
@ -1621,6 +1622,7 @@ public class JSONObject {
* brace)</small> and ending with <code>}</code>&nbsp;<small>(right * brace)</small> and ending with <code>}</code>&nbsp;<small>(right
* brace)</small>. * brace)</small>.
*/ */
@Override
public String toString() { public String toString() {
try { try {
return this.toString(0); return this.toString(0);
@ -1880,13 +1882,13 @@ public class JSONObject {
} }
/** /**
* Returns a java.util.Map containing all of the entrys in this object. * Returns a java.util.Map containing all of the entries in this object.
* If an entry in the object is a JSONArray or JSONObject it will also * If an entry in the object is a JSONArray or JSONObject it will also
* be converted. * be converted.
* <p> * <p>
* Warning: This method assumes that the data structure is acyclical. * Warning: This method assumes that the data structure is acyclical.
* *
* @return a java.util.Map containing the entrys of this object * @return a java.util.Map containing the entries of this object
*/ */
public Map<String, Object> toMap() { public Map<String, Object> toMap() {
Map<String, Object> results = new HashMap<String, Object>(); Map<String, Object> results = new HashMap<String, Object>();