Package siena

Examples of siena.Json.keys()


  }
 
  public void testSortedMap() {
    Json json = Json.sortedMap().put("1", 1).put("400", 400).put("3", 3).put("2", 2);
   
    Iterator<String> keys = json.keys().iterator();
    assertEquals("1", keys.next());
    assertEquals("2", keys.next());
    assertEquals("3", keys.next());
    assertEquals("400", keys.next());
  }
View Full Code Here


    assertEquals("400", keys.next());
  }
 
  public void testSortedMap2() {
    Json json = Json.sortedMap().put("2009-01", 1).put("2008-10", 400);
    Iterator<String> keys = json.keys().iterator();
    assertEquals("2008-10", keys.next());
    assertEquals("2009-01", keys.next());
  }
 
  public void testContains() {
View Full Code Here

      if("@".equals(key)) {
        Json value = json.get(key);
        if(value.isString()) {
          element.setText(value.str());
        } else {
          Set<String> ks = value.keys();
          for (String k : ks) {
            Element child = element.addElement(k);
            fromJson(value.get(k), child);
          }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.