Skip to content

Commit

Permalink
Fix typo's, grammar and spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Jan 17, 2024
1 parent 8e4caec commit 5fa73f5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Pekko Streams Circe Support

This library provides Json support for stream based applications using [jawn](https://github.com/non/jawn)
as a parser. It supports all backends that jawn supports with support for [circe](https://github.com/travisbrown/circe) provided as a example.
as a parser. It supports all backends that jawn supports with support for [circe](https://github.com/travisbrown/circe) provided as an example.

It is a fork of [akka-streams-json](https://github.com/mdedetrich/akka-streams-json) built with [Apache Pekko](https://pekko.apache.org/).
[akka-streams-json](https://github.com/mdedetrich/akka-streams-json) which is in itself a fork of
Expand Down Expand Up @@ -36,13 +36,13 @@ The parser lives at `org.mdedetrich.pekko.json.stream.JsonStreamParser`
Use one of the constructor methods in the companion object to create the parser at
various levels of abstraction, either a Stage, a Flow, or a Sink.
You just add the [jawn support facade](https://github.com/non/jawn#supporting-external-asts-with-jawn)
of your choice and you will can parsed into their respective Json AST.
of your choice, and you will can parsed into their respective Json AST.


For Http support, either `import org.mdedetrich.pekko.http.JsonSupport._`
or mixin `... with org.mdedetrich.pekko.http.JsonSupport`.

Given an implicit jawn facade, this enable you to decode into the respective Json AST
Given an implicit jawn facade, this enables you to decode into the respective Json AST
using the Pekko HTTP marshalling framework. As jawn is only about parsing and does not abstract
over rendering, you'll only get an Unmarshaller.

Expand All @@ -63,7 +63,7 @@ Adding support for a specific framework is
[easy](support/http-circe/src/main/scala/org/mdedetrich/pekko/http/support/CirceHttpSupport.scala).

These support modules allow you to directly marshall from/unmarshall into your data types
using circes `Decoder` and `Encoder` type classes.
using circe's `Decoder` and `Encoder` type classes.

Just mixin or import `org.mdedetrich.pekko.http.support.CirceHttpSupport` for Http
or pipe your `Source[ByteString, _].via(org.mdedetrich.pekko.stream.CirceStreamSupport.decode[A])`
Expand All @@ -77,11 +77,9 @@ The exception provides Circe cursor history, current cursor and the type hint of

## Why jawn?

Jawn provides a nice interface for asynchronous parsing.
Most other Json marshalling provider will consume the complete entity
at first, convert it to a string and then start to parse.
With jawn, the json is incrementally parsed with each arriving data chunk,
using directly the underlying ByteBuffers without conversion.
Jawn provides a nice interface for asynchronous parsing. Most other Json marshalling provider will consume the complete
entity at first, convert it to a string and then start to parse. With jawn, the json is incrementally parsed with
each arriving data chunk, using directly the underlying ByteBuffers without conversion.

## License

Expand Down

0 comments on commit 5fa73f5

Please sign in to comment.