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. 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. case class JsonIO[T](path: String) extends TestIO[T] with Product with Serializable

    Permalink
  5. implicit class JsonSCollection[T] extends Serializable

    Permalink

    Enhanced version of SCollection with JSON methods.

  6. implicit class JsonScioContext extends Serializable

    Permalink

    Enhanced version of ScioContext with JSON methods.

Value Members

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

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

    Permalink
    Definition Classes
    AutoDerivation

Inherited from AutoDerivation

Inherited from AnyRef

Inherited from Any

Ungrouped