Question: I need to read the data from this link <http://www.bls.gov/cpi/cpifiles/cpiai.txt> into a data frame. Sadly the data is not in a csv file. What is the best way of doing it?

I tried 

```
cpiai <- read.table("http://www.bls.gov/cpi/cpifiles/cpiai.txt")

```

Thanks!

Answer: 
It is definitely possible to use Couchbase with Dropwizard. The client SDK provides JSON manipulation objects for the developer's convenience but it also allows for delegating JSON processing to a library like Jackson or GSON.
Take a look at the `RawJsonDocument` class [here](http://developer.couchbase.com/documentation/server/4.1/sdks/java-2.2/documents-basics.html#documents-basics__jsonraw).
Basically, you can use a Stringified JSON (coming out of any framework) to create one of those objects and the client SDK will understand it as a JSON document for any operation i.e.:

```
String content = "{\"hello\": \"couchbase\", \"active\": true}";
bucket.upsert(RawJsonDocument.create("rawJsonDoc", content));

```
A solution based on [@CamiloCrespo](https://stackoverflow.com/a/34306338/3405171) answer:

```
public static Document<String> toDocument(String id, Object value,
        ObjectMapper mapper) throws JsonProcessingException {
    return RawJsonDocument.create(id, mapper.writeValueAsString(value));
}

```

Keep in mind, that you can't use a simply maper, like `ObjectMapper mapper = new ObjectMapper()`, with `Dropwizard`.

You can get it from `Environment#getObjectMapper()` in the `Application#run()` method, or use `Jackson.newObjectMapper()` for tests.

An example of using:

```
ObjectMapper mapper = Jackson.newObjectMapper();
User user = User.createByLoginAndName("login", "name");
bucket.insert(toDocument("123", user, mapper));

```