package json
- Grouped
- Alphabetic
- By Inheritance
- json
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait IntoJacksonJsonParser[F[_], -S] extends AnyRef
Typeclass for "source" types that can be passed to a
com.fasterxml.jackson.core.JsonFactory
to create acom.fasterxml.jackson.core.JsonParser
(wrapped as a Resource) which can be used as the underlying JsonEvent source for spac JsonParsers.Typeclass for "source" types that can be passed to a
com.fasterxml.jackson.core.JsonFactory
to create acom.fasterxml.jackson.core.JsonParser
(wrapped as a Resource) which can be used as the underlying JsonEvent source for spac JsonParsers.- F
An effect type, e.g.
cats.effect.IO
used to represent the opening and closing of the underlying parser- S
The source type, e.g.
File
,String
,Resource[F, Reader]
, orResource[F, InputStream]
- type JsonContextMatcher[+C] = ContextMatcher[JsonStackElem, C]
- type JsonParser[+Out] = Parser[JsonEvent, Out]
- type JsonSplitter[+C] = Splitter[JsonEvent, C]
- type JsonTransformer[+Out] = Transformer[JsonEvent, Out]
Value Members
- val JsonParser: ParserApplyWithBoundInput[JsonEvent]
- val JsonSplitter: SplitterApplyWithBoundInput[JsonEvent]
- val JsonTransformer: TransformerApplyWithBoundInput[JsonEvent]
- def anyField: JsonContextMatcher[String]
- def anyIndex: JsonContextMatcher[Int]
- def field[A](contextFromName: (String) => Option[A]): JsonContextMatcher[A]
- implicit def field(name: String): JsonContextMatcher[Unit]
- def fieldWhere(f: (String) => Boolean): JsonContextMatcher[String]
- def index[A](contextFromIndex: (Int) => Option[A]): JsonContextMatcher[A]
- def index(i: Int): JsonContextMatcher[Unit]
- def indexWhere(f: (Int) => Boolean): JsonContextMatcher[Int]
- implicit val jsonParserForPrimitiveBoolean: JsonParser[Boolean]
- implicit val jsonParserForPrimitiveDouble: JsonParser[Double]
- implicit val jsonParserForPrimitiveFloat: JsonParser[Float]
- implicit val jsonParserForPrimitiveInt: JsonParser[Int]
- implicit val jsonParserForPrimitiveLong: JsonParser[Long]
- implicit val jsonParserForPrimitiveNull: JsonParser[None.type]
- implicit val jsonParserForPrimitiveString: JsonParser[String]
- object IntoJacksonJsonParser
- object JacksonSource
Provides helpers for creating
fs2.Stream
andIterator
instances ofJsonEvent
from various underlying event sources, using the Jackson library as the underlying event parser.Provides helpers for creating
fs2.Stream
andIterator
instances ofJsonEvent
from various underlying event sources, using the Jackson library as the underlying event parser.The helpers in this object operate in terms of the
IntoJacksonJsonParser
typeclass, which defines logic for using asource
value to construct a Jackson JsonParser in a Resource. From there, the helpers take care of converting the jackson parser/event model to the spac JsonEvent model.For example:
val file = new File("./stuff.json") val jsonStream: Stream[IO, JsonEvent] = JacksonSource[IO](file)
- object JacksonSupport
Provides implicits that allow various data sources to be passed to a JsonParser's
parse
method, using the Jackson library's classes as the underlying JSON event generator.Provides implicits that allow various data sources to be passed to a JsonParser's
parse
method, using the Jackson library's classes as the underlying JSON event generator.By default, a
Parsable
instance is made available for the following types:String
java.io.File
Resource[F, java.io.InputStream]
(whereF
belongs toSync
)Resource[F, java.io.Reader]
(whereF
belongs toSync
)
A rough outline of the implicit derivation is:
Source => Resource[F, JacksonJsonParser] => Stream[F, JsonEvent] => Parsable[Source]