scala.util.parsing.json

object JSON

[source: scala/util/parsing/json/JSON.scala]

object JSON
extends Parser
This object provides a simple interface to the JSON parser class.
Author
Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
Values and Variables inherited from Parser
lexical
Values and Variables inherited from Parsers
lastNoSuccess
Method Summary
def parse (input : java.lang.String) : Option[List[Any]]
Parse the given JSON string and return a list of elements. If the string is a JSON object it will be a list of pairs. If it's a JSON array it will be be a list of individual elements.
def parseFull (input : java.lang.String) : Option[Any]
Parse the given JSON string and return either a List[Any] if the JSON string specifies an Array, or a Map[String,Any] if the JSON string specifies an object.
def resolveType (input : List[Any]) : Any
A utility method to resolve a parsed JSON list into objects or arrays. See the parse method for details.
Methods inherited from Parser
root, jsonObj, jsonArray, objEntry, value, stringVal, number
Methods inherited from ImplicitConversions
flatten2, flatten3, flatten4, flatten5, headOptionTailToFunList
Methods inherited from StdTokenParsers
keyword, numericLit, stringLit, ident
Methods inherited from Parsers
Parser, OnceParser, commit, elem, elem, accept, accept, accept, acceptIf, acceptMatch, acceptSeq, failure, err, success, log, rep, repsep, rep1, rep1, repN, rep1sep, chainl1, chainl1, chainr1, opt, not, positioned, phrase, mkList
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def parse(input : java.lang.String) : Option[List[Any]]
Parse the given JSON string and return a list of elements. If the string is a JSON object it will be a list of pairs. If it's a JSON array it will be be a list of individual elements.
Parameters
input - the given JSON string.
Returns
an optional list of of elements.

def parseFull(input : java.lang.String) : Option[Any]
Parse the given JSON string and return either a List[Any] if the JSON string specifies an Array, or a Map[String,Any] if the JSON string specifies an object.
Parameters
input - the given JSON string.
Returns
an optional list or map.

def resolveType(input : List[Any]) : Any
A utility method to resolve a parsed JSON list into objects or arrays. See the parse method for details.