]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/java/org/opensrf/test/TestJSON.java
added initial opensrf stack layer objects. more tuning/testing of the jabber layer
[OpenSRF.git] / src / java / org / opensrf / test / TestJSON.java
1 package org.opensrf.test;
2
3 import org.opensrf.util.JSON;
4 import java.util.*;
5
6 public class TestJSON {
7
8     public static void main(String args[]) {
9         
10         Map<String,Object> map = new HashMap<String,Object>();
11         map.put("key1", "value1");
12         map.put("key2", "value2");
13         map.put("key3", "value3");
14         map.put("key4", "athe\u0301s");
15         map.put("key5", null);
16
17         List<Object> list = new ArrayList<Object>(16);
18         list.add(new Integer(1));
19         list.add(new Boolean(true));
20         list.add("WATER");
21         list.add(null);
22         map.put("key6", list);
23
24         System.out.println(JSON.toJSON(map));
25     }
26 }