embulk / embulk-base-restclient

Base class library for Embulk plugins to access RESTful services
https://www.embulk.org/
Apache License 2.0
6 stars 7 forks source link

Add JacksonJsonPointerValueLocator to locate a value not on the top level. #10

Closed dmikurube closed 7 years ago

dmikurube commented 7 years ago

See a sample usage below.

Response:

{
  "foo": {
    "bar": {
      "id": 123
    }
  }
}

Building ServiceResponseSchema to read that 123.

        JacksonServiceResponseSchema.builder()
            // Reading "/foo/bar/id" as Embulk's column "id".
            .add(new JacksonJsonPointerValueLocator("/foo/bar/id"), "id", Types.LONG)
        ...