From 5fa73f5304e4244d062261b20cf5dc22f794fd3b Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Wed, 17 Jan 2024 18:31:24 +1100 Subject: [PATCH] Fix typo's, grammar and spelling --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4e8ecb1..a060e91 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. @@ -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])` @@ -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