Logo Search packages:      
Sourcecode: libjson-java version File versions

static List net::sf::json::JSONArray::toList ( JSONArray  jsonArray,
Class  objectClass,
Map  classMap 
) [inline, static]

Creates a List from a JSONArray.
Any attribute is a JSONObject and matches a key in the classMap, it will be converted to that target class.
The classMap has the following conventions:

  • Every key must be an String.
  • Every value must be a Class.
  • A key may be a regular expression.

replaced by toCollection
See also:

Definition at line 596 of file JSONArray.java.

References net::sf::json::JsonConfig::setClassMap(), net::sf::json::JsonConfig::setRootClass(), and toList().

      JsonConfig jsonConfig = new JsonConfig();
      jsonConfig.setRootClass( objectClass );
      jsonConfig.setClassMap( classMap );
      return toList( jsonArray, jsonConfig );

Generated by  Doxygen 1.6.0   Back to index