    001/* ============
    002 * Orson Charts
    003 * ============
    004 *
    005 * (C)opyright 2013, 2014, by Object Refinery Limited.
    006 *
    007 * http://www.object-refinery.com/orsoncharts/index.html
    008 *
    009 * JSON.simple
    010 * -----------
    011 * The code in this file originates from the JSON.simple project by
    012 * FangYidong<fangyidong@yahoo.com.cn>:
    013 *
    014 *     https://code.google.com/p/json-simple/
    015 *
    016 * which is licensed under the Apache Software License version 2.0.
    017 *
    018 * It has been modified locally and repackaged under
    019 * com.orsoncharts.util.json.* to avoid conflicts with any other version that
    020 * may be present on the classpath.
    021 *
    022 */
    023
    024package com.orsoncharts.util.json.parser;
    025
    026import java.util.List;
    027import java.util.Map;
    028
    029/**
    030 * Container factory for creating containers for JSON object and JSON array.
    031 *
    032 * @see com.orsoncharts.util.json.parser.JSONParser#parse(java.io.Reader,
    033 *     ContainerFactory)
    034 */
    035public interface ContainerFactory {
    036
    037    /**
    038     * @return A Map instance to store JSON object, or null if you want to use
    039     *     com.orsoncharts.util.json.JSONObject.
    040     */
    041    Map createObjectContainer();
    042
    043    /**
    044     * @return A List instance to store JSON array, or null if you want to use
    045     *     com.orsoncharts.util.json.JSONArray.
    046     */
    047    List creatArrayContainer();
    048}
    049