sdk-java/formats/json-jackson
Francesco Guardiani 2b5e72c50a
Reworked Vert.x Integration (#129)
* Started http-vertx module reworking

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Vertx integration done

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Adjusted the READMEs

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Case sensitivity fix

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-04-24 12:17:49 +02:00
..
src Reworked Vert.x Integration (#129) 2020-04-24 12:17:49 +02:00
README.md Reworked Vert.x Integration (#129) 2020-04-24 12:17:49 +02:00
pom.xml Reworked Vert.x Integration (#129) 2020-04-24 12:17:49 +02:00

README.md

Json EventFormat implementation with Jackson

Implementation of EventFormat using Jackson.

For Maven:

<dependency>
    <groupId>io.cloudevents</groupId>
    <artifactId>json-jackson</artifactId>
    <version>2.0.0-SNAPSHOT </version>
</dependency>

Usage

You don't need to perform any operation to configure the module, more than adding the dependency to your project:

CloudEvent event = CloudEvent.buildV1()
  .withId("hello")
  .withType("example.vertx")
  .withSource(URI.create("http://localhost"))
  .build();

byte[] serialized = EventFormatProvider
  .getInstance()
  .resolveFormat("application/json")
  .serialize(event);