Package com.yahoo.text
Class JSON
- java.lang.Object
-
- com.yahoo.text.JSON
-
public final class JSON extends java.lang.Object
Static methods for working with the map textual format which is parsed byMapParser
- Author:
- bratseth
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
encode(java.util.Map<java.lang.String,?> map)
Outputs a map as a JSON 'object' string, provided that the map values are either String Number Any object whose toString returns JSONstatic java.lang.String
escape(java.lang.String s)
Returns the given string as a properly json escaped string
-
-
-
Method Detail
-
encode
public static java.lang.String encode(java.util.Map<java.lang.String,?> map)
Outputs a map as a JSON 'object' string, provided that the map values are either- String
- Number
- Any object whose toString returns JSON
-
escape
public static java.lang.String escape(java.lang.String s)
Returns the given string as a properly json escaped string
-
-