@Test public void convertsMapToJson() throws Exception { Map<String, Book> books = ImmutableMap.of("0", junitBook, "1", csharpBook, "2", javaScriptBook); JsonValue jsonValue = JsonGenerator.createJsonObjectFromMap(books); assertTrue(jsonValue.isObject()); assertionHelper.assertThatJsonHasAllItemsFromMap(books, jsonValue); }
public static JsonValue createJsonObjectFromMap(Map<String, ?> map) throws JsonException { if (map == null) { return new NullValue(); } return createJsonValue(map, MAP); }
JsonGenerator { public static JsonValue createJsonObjectFromMap(Map<String, ?> map) throws JsonException { if (map == null) { return new NullValue(); } return createJsonValue(map, MAP); } }
JsonGenerator { public static JsonValue createJsonObjectFromMap(Map<String, ?> map) throws JsonException { if (map == null) { return new NullValue(); } return createJsonValue(map, MAP); }  }
JsonGenerator { public static JsonValue createJsonObjectFromMap(Map<String, ?> map) throws JsonException { if (map == null) { return new NullValue(); } return createJsonValue(map, MAP); }  static JsonValue createJsonArray(Collection<?> collection); static JsonValue createJsonArray(Object array); static JsonValue createJsonObjectFromMap(Map<String, ?> map); static JsonValue createJsonObject(Object object); }
JsonGenerator { public static JsonValue createJsonObjectFromMap(Map<String, ?> map) throws JsonException { if (map == null) { return new NullValue(); } return createJsonValue(map, MAP); }  static JsonValue createJsonArray(Collection<?> collection); static JsonValue createJsonArray(Object array); static JsonValue createJsonObjectFromMap(Map<String, ?> map); static JsonValue createJsonObject(Object object);  }