Fixes #3385 Modernize jetty-util-ajax.

Removed deprecated methods as suggested in review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-01-17 12:04:23 +01:00
parent 9998069cb8
commit 9a5cadca10
1 changed files with 0 additions and 90 deletions

View File

@ -105,48 +105,6 @@ public class JSON
_stringBufferSize = stringBufferSize;
}
/**
* <p>Converts the given object to JSON.</p>
*
* @param object the object to convert
* @return the JSON string representation of the object
* @deprecated use {@link JSON#toJSON(Object)} instead
*/
@Deprecated(forRemoval = true)
public static String toString(Object object)
{
JSON json = new JSON();
return json.toJSON(object);
}
/**
* <p>Converts the given Map to JSON.</p>
*
* @param map the Map to convert
* @return the JSON string representation of the map
* @deprecated use {@link JSON#toJSON(Object)} instead
*/
@Deprecated(forRemoval = true)
public static String toString(Map<?, ?> map)
{
JSON json = new JSON();
return json.toJSON(map);
}
/**
* <p>Converts the given array to JSON.</p>
*
* @param array the array to convert
* @return the JSON string representation of the array
* @deprecated use {@link JSON#toJSON(Object)} instead
*/
@Deprecated(forRemoval = true)
public static String toString(Object[] array)
{
JSON json = new JSON();
return json.toJSON(array);
}
private void quotedEscape(Appendable buffer, String input)
{
try
@ -648,54 +606,6 @@ public class JSON
return _convertors.get(name);
}
/**
* @param reader the Reader to read the JSON representation from
* @return the object constructed from the JSON string representation
* @throws IOException if unable to parse
* @deprecated use {@link #fromJSON(Reader)}
*/
@Deprecated(forRemoval = true)
public static Object parse(Reader reader) throws IOException
{
return new JSON().parse(new ReaderSource(reader), false);
}
/**
* @param reader the Reader to read the JSON representation from
* @param stripOuterComment whether to ignore an outer comment around the JSON
* @return the object constructed from the JSON string representation
* @throws IOException if unable to parse
* @deprecated use {@link #fromJSON(Reader)}
*/
@Deprecated(forRemoval = true)
public static Object parse(Reader reader, boolean stripOuterComment) throws IOException
{
return new JSON().parse(new ReaderSource(reader), stripOuterComment);
}
/**
* @param json the JSON string to parse
* @return the object constructed from the JSON string representation
* @deprecated use {@link #fromJSON(String)}
*/
@Deprecated(forRemoval = true)
public static Object parse(String json)
{
return new JSON().parse(new StringSource(json), false);
}
/**
* @param json the JSON string to parse
* @param stripOuterComment whether to ignore an outer comment around the JSON
* @return the object constructed from the JSON string representation
* @deprecated use {@link #fromJSON(String)}
*/
@Deprecated(forRemoval = true)
public static Object parse(String json, boolean stripOuterComment)
{
return new JSON().parse(new StringSource(json), stripOuterComment);
}
/**
* <p>Parses the given JSON source into an object.</p>
* <p>Although the JSON specification does not allow comments (of any kind)