001/* Copyright 2006 FangYidong
002
003   Licensed under the Apache License, Version 2.0 (the "License");
004   you may not use this file except in compliance with the License.
005   You may obtain a copy of the License at
006
007       http://www.apache.org/licenses/LICENSE-2.0
008
009   Unless required by applicable law or agreed to in writing, software
010   distributed under the License is distributed on an "AS IS" BASIS,
011   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012   See the License for the specific language governing permissions and
013   limitations under the License. */
014package org.json.simple.parser;
015
016import java.util.List;
017import java.util.Map;
018
019/**
020 * Container factory for creating containers for JSON object and JSON array.
021 * 
022 * @see org.json.simple.parser.JSONParser#parse(java.io.Reader, ContainerFactory)
023 * 
024 * @author FangYidong<fangyidong@yahoo.com.cn>
025 * @deprecated since 2.0.0 the same results can be achieved with the Map and Collection constructors in java post parsing.
026 */
027@Deprecated
028public interface ContainerFactory {
029        /**
030         * @return A Map instance to store JSON object, or null if you want to use org.json.simple.JSONObject.
031         */
032        Map createObjectContainer();
033        
034        /**
035         * @return A List instance to store JSON array, or null if you want to use org.json.simple.JSONArray. 
036         */
037        List creatArrayContainer();
038}