Package

com.spotify.scio.extra

json

Permalink

package json

Main package for JSON APIs. Import all.

This package uses Circe for JSON handling under the hood.

import com.spotify.scio.extra.json._

// define a type-safe JSON schema
case class 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
  1. Alphabetic
  2. By Inheritance
Inherited
  1. json
  2. AutoDerivation
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class DecodeError(error: Error, input: String) extends Product with Serializable

    Permalink

    A wrapper for io.circe.Error that also retains the original input string.

  2. type Decoder[T] = io.circe.Decoder[T]

    Permalink
  3. type Encoder[T] = io.circe.Encoder[T]

    Permalink
  4. final case class JsonIO[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

    Permalink
  5. implicit class JsonSCollection[T] extends Serializable

    Permalink

    Enhanced version of SCollection with JSON methods.

  6. implicit final class JsonScioContext extends AnyVal

    Permalink

    Enhanced version of ScioContext with JSON methods.

Value Members

  1. object JsonIO extends Serializable

    Permalink
  2. implicit macro def exportDecoder[A]: Exported[io.circe.Decoder[A]]

    Permalink
    Definition Classes
    AutoDerivation
  3. implicit macro def exportEncoder[A]: Exported[ObjectEncoder[A]]

    Permalink
    Definition Classes
    AutoDerivation

Inherited from AutoDerivation

Inherited from AnyRef

Inherited from Any

Ungrouped