|
1 package org.json.simple.parser; |
|
2 |
|
3 import java.util.List; |
|
4 import java.util.Map; |
|
5 |
|
6 /** |
|
7 * Container factory for creating containers for JSON object and JSON array. |
|
8 * |
|
9 * @see org.json.simple.parser.JSONParser#parse(java.io.Reader, ContainerFactory) |
|
10 * |
|
11 * @author FangYidong<fangyidong@yahoo.com.cn> |
|
12 */ |
|
13 public interface ContainerFactory { |
|
14 /** |
|
15 * @return A Map instance to store JSON object, or null if you want to use org.json.simple.JSONObject. |
|
16 */ |
|
17 Map createObjectContainer(); |
|
18 |
|
19 /** |
|
20 * @return A List instance to store JSON array, or null if you want to use org.json.simple.JSONArray. |
|
21 */ |
|
22 List creatArrayContainer(); |
|
23 } |