scala.util.parsing

json

package json

Visibility
  1. Public
  2. All

Type Members

  1. case class JSONArray(list: List[Any]) extends JSONType with Product with Serializable

    Represents a JSON Array (list).

  2. case class JSONObject(obj: Map[String, Any]) extends JSONType with Product with Serializable

    Represents a JSON Object (map).

  3. sealed abstract class JSONType extends AnyRef

    A marker class for the JSON result types.

  4. class Lexer extends StdLexical with ImplicitConversions

  5. class Parser extends StdTokenParsers with ImplicitConversions

    The main JSON Parser.

Value Members

  1. object JSON extends Parser

    This object provides a simple interface to the JSON parser class.

    This object provides a simple interface to the JSON parser class. The default conversion for numerics is into a double. If you wish to override this behavior at the global level, you can set the globalNumberParser property to your own (String => Any) function. If you only want to override at the per-thread level then you can set the perThreadNumberParser property to your function. For example:

    val myConversionFunc = {input : String => BigDecimal(input)}
    
    // Global override
    JSON.globalNumberParser = myConversionFunc
    
    // Per-thread override
    JSON.perThreadNumberParser = myConversionFunc
  2. object JSONFormat

    This object defines functions that are used when converting JSONType values into String representations.

    This object defines functions that are used when converting JSONType values into String representations. Mostly this is concerned with proper quoting of strings.