Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Caddy | 46,419 | 118 | 334 | a day ago | 85 | October 26, 2020 | 103 | apache-2.0 | Go | |
Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS | ||||||||||
Httpie | 26,922 | 1,645 | 42 | a day ago | 55 | May 06, 2022 | 144 | bsd-3-clause | Python | |
🥧 HTTPie for Terminal — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. | ||||||||||
Hutool | 25,740 | 592 | 258 | 21 hours ago | 173 | September 15, 2022 | 2 | other | Java | |
🍬A set of tools that keep Java sweet. | ||||||||||
Apijson | 14,937 | 3 days ago | 187 | other | Java | |||||
🏆 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 🏆 A JSON Transmission Protocol and an ORM Library 🚀 provides APIs and Docs without writing any code. | ||||||||||
Got | 12,766 | 235,715 | 6,429 | 9 days ago | 162 | September 19, 2022 | 75 | mit | TypeScript | |
🌐 Human-friendly and powerful HTTP request library for Node.js | ||||||||||
Httpbin | 11,561 | 549 | 6 | 4 hours ago | 13 | May 08, 2018 | 173 | isc | Python | |
HTTP Request & Response Service, written in Python + Flask. | ||||||||||
Http Prompt | 8,688 | 7 | 1 | a year ago | 24 | March 05, 2021 | 49 | mit | Python | |
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie | ||||||||||
Refit | 6,966 | 178 | 495 | 2 days ago | 68 | February 08, 2022 | 188 | mit | C# | |
The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface. | ||||||||||
Rest Assured | 6,303 | 7,364 | 395 | 4 days ago | 29 | September 09, 2022 | 498 | apache-2.0 | Java | |
Java DSL for easy testing of REST services | ||||||||||
Wiremock | 5,437 | 1,626 | 752 | 21 hours ago | 104 | September 10, 2020 | 275 | apache-2.0 | Java | |
A tool for mocking HTTP services |
This library provides Json support for stream based applications using jawn as a parser. It supports all backends that jawn supports with support for circe provided as a example.
There are two main modules, akka-stream-json
and akka-http-json
.
akka-stream-json
is the basis and provides the stream-based parser while
akka-http-json
enabled support to use the desired json library as an Unmarshaller.
libraryDependencies ++= List(
"de.knutwalker" %% "akka-stream-json" % "3.3.0",
"de.knutwalker" %% "akka-http-json" % "3.3.0"
)
akka-stream-json
depends on jawn-parser
at version 0.10.4
and is compiled against akka-stream
at version 2.4.17
.
The circe submodule depends on version 0.8.0
of circe-jawn
The Akk Http submodule depends on version 10.0.7
of akka-http
akka-stream-json
is published for Scala 2.12 and 2.11.
The parser lives at de.knutwalker.akka.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 of your choice and you will can parsed into their respective Json AST.
For Http support, either import de.knutwalker.akka.http.JsonSupport._
or mixin ... with de.knutwalker.akka.http.JsonSupport
.
Given an implicit jawn facade, this enable you to decode into the respective Json AST using the Akka HTTP marshalling framework. As jawn is only about parsing and does not abstract over rendering, you'll only get an Unmarshaller.
libraryDependencies ++= List(
"de.knutwalker" %% "akka-stream-circe" % "3.4.0",
"de.knutwalker" %% "akka-http-circe" % "3.4.0"
)
(Using circe 0.8.0)
Adding support for a specific framework is quite easy.
These support modules allow you to directly marshall from/unmarshall into your data types
using circes Decoder
and Encoder
type classes.
Just mixin or import de.knutwalker.akka.http.support.CirceHttpSupport
for Http
or pipe your Source[ByteString, _].via(de.knutwalker.akka.stream.CirceStreamSupport.decode[A])
to get a Source[A, _]
.
This flow even supports parsing multiple json documents in whatever fragmentation they may arrive, which is great for consuming stream/sse based APIs.
If there is an error in parsing the Json you can catch de.knutwalker.akka.http.support.CirceStreamSupport.JsonParsingException
.
The exception provides Circe cursor history, current cursor and the type hint of the error.
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.
This code is open source software licensed under the Apache 2.0 License.