@Test public void testI18nToString() { String key = "foo"; String i18n = TEST_VALUE_I18N; Map<String, Object> object = Maps.newHashMap(); object.put(key, i18n); String json = mapper.toString(object); assertEquals(TEST_JSON_I18N, json); }
@Override public String toString(Object data) throws InteractiveSpacesException { try { return MAPPER.writeValueAsString(data); } catch (Throwable e) { throw new JsonInteractiveSpacesException("Could not serialize JSON object as string", e); } }
StandardJsonMapper implements JsonMapper { @Override public String toString(Object data) throws InteractiveSpacesException { try { return MAPPER.writeValueAsString(data); } catch (Throwable e) { throw new JsonInteractiveSpacesException("Could not serialize JSON object as string", e); } } }
StandardJsonMapper implements JsonMapper { @Override public String toString(Object data) throws InteractiveSpacesException { try { return MAPPER.writeValueAsString(data); } catch (Throwable e) { throw new JsonInteractiveSpacesException("Could not serialize JSON object as string", e); } }  }
StandardJsonMapper implements JsonMapper { @Override public String toString(Object data) throws InteractiveSpacesException { try { return MAPPER.writeValueAsString(data); } catch (Throwable e) { throw new JsonInteractiveSpacesException("Could not serialize JSON object as string", e); } }  @Override Map<String, Object> parseObject(String object); @Override String toString(Object data); }
StandardJsonMapper implements JsonMapper { @Override public String toString(Object data) throws InteractiveSpacesException { try { return MAPPER.writeValueAsString(data); } catch (Throwable e) { throw new JsonInteractiveSpacesException("Could not serialize JSON object as string", e); } }  @Override Map<String, Object> parseObject(String object); @Override String toString(Object data); static final JsonMapper INSTANCE; }