@Test( expectedExceptions = { JsonParsingException.class } ) public void toJsonObject_badObject() { final JsonObject jsonObject = JsonUtil.toJsonObject( "" ); assertEquals( jsonObject.size(), 0 ); }
@Nonnull public static JsonObject toJsonObject( @Nonnull final String content ) { final StringReader stringReader = new StringReader( content ); try ( final JsonReader reader = c_readerFactory.createReader( stringReader ) ) { return reader.readObject(); } }
JsonUtil { @Nonnull public static JsonObject toJsonObject( @Nonnull final String content ) { final StringReader stringReader = new StringReader( content ); try ( final JsonReader reader = c_readerFactory.createReader( stringReader ) ) { return reader.readObject(); } } }
JsonUtil { @Nonnull public static JsonObject toJsonObject( @Nonnull final String content ) { final StringReader stringReader = new StringReader( content ); try ( final JsonReader reader = c_readerFactory.createReader( stringReader ) ) { return reader.readObject(); } } private  JsonUtil(); }
JsonUtil { @Nonnull public static JsonObject toJsonObject( @Nonnull final String content ) { final StringReader stringReader = new StringReader( content ); try ( final JsonReader reader = c_readerFactory.createReader( stringReader ) ) { return reader.readObject(); } } private  JsonUtil(); @Nonnull static JsonObject toJsonObject( @Nonnull final String content ); @Nonnull static JsonObject toJsonObject( @Nonnull final Object object ); @Nonnull static String toJsonString( @Nullable final Object object ); }
JsonUtil { @Nonnull public static JsonObject toJsonObject( @Nonnull final String content ) { final StringReader stringReader = new StringReader( content ); try ( final JsonReader reader = c_readerFactory.createReader( stringReader ) ) { return reader.readObject(); } } private  JsonUtil(); @Nonnull static JsonObject toJsonObject( @Nonnull final String content ); @Nonnull static JsonObject toJsonObject( @Nonnull final Object object ); @Nonnull static String toJsonString( @Nullable final Object object );  }