This package uses Circe for JSON handling under the hood.
import com.spotify.scio.extra.json._
// define a type-safe JSON schemacaseclass Record(i: Int, d: Double, s: String)
// read JSON as case classes
sc.jsonFile[Record]("input.json")
// write case classes as JSON
sc.parallelize((1 to 10).map(x => Record(x, x.toDouble, x.toString))
.saveAsJsonFile("output")
Linear Supertypes
AutoDerivation, AnyRef, Any
Ordering
Alphabetic
By Inheritance
Inherited
json
AutoDerivation
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Type Members
final case classDecodeError(error: Error, input: String) extends Product with Serializable
A wrapper for io.circe.Error that also retains the original input string.
typeDecoder[T] = io.circe.Decoder[T]
typeEncoder[T] = io.circe.Encoder[T]
final case classJsonIO[T](path: String)(implicit evidence$1: ClassTag[T], evidence$2: Encoder[T], evidence$3: Decoder[T], evidence$4: Coder[T]) extends ScioIO[T] with Product with Serializable
Main package for JSON APIs. Import all.
This package uses Circe for JSON handling under the hood.