Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.13 KB

README.md

File metadata and controls

43 lines (32 loc) · 1.13 KB

ndjson

Build Status Maven Central

Java library for creating and parsing ND-JSON

Uses Jackson JSON parser

Usage

Deserialization

    NdJsonObjectMapper ndJsonObjectMapper = new NdJsonObjectMapper();
    InputStream is = ....;
    Stream<Car> readValue = ndJsonObjectMapper.readValue(is, Car.class);

Serialization

    NdJsonObjectMapper ndJsonObjectMapper = new NdJsonObjectMapper();
    OutputStream out = ... ;
    Stream <Car> carStream = ...;
    ndJsonObjectMapper.writeValue(out, carStream);

How to add NDJSON to your project

Maven:

<dependency>
  <groupId>in.abilng</groupId>
  <artifactId>ndjson</artifactId>
  <version>1.0.1</version>
</dependency>

SBT:

libraryDependencies += "in.abilng" % "ndjson"