URL value = new URL("http://foo.com");
assertEquals(value, MAPPER.readValue("\""+value.toString()+"\"", URL.class));
// trivial case; null to null, embedded URL to URL
TokenBuffer buf = new TokenBuffer(null, false);
buf.writeObject(null);
assertNull(MAPPER.readValue(buf.asParser(), URL.class));
buf.close();
// then, URLitself come as is:
buf = new TokenBuffer(null, false);