Circe derivation

circe derivation

License

License

GroupId

GroupId

io.circe
ArtifactId

ArtifactId

circe-derivation_sjs0.6_2.12
Last Version

Last Version

0.13.0-M2
Release Date

Release Date

Type

Type

jar
Description

Description

Circe derivation
circe derivation
Project URL

Project URL

https://github.com/circe/circe-derivation
Project Organization

Project Organization

io.circe
Source Code Management

Source Code Management

https://github.com/circe/circe-derivation

Download circe-derivation_sjs0.6_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/io.circe/circe-derivation_sjs0.6_2.12/ -->
<dependency>
    <groupId>io.circe</groupId>
    <artifactId>circe-derivation_sjs0.6_2.12</artifactId>
    <version>0.13.0-M2</version>
</dependency>
// https://jarcasting.com/artifacts/io.circe/circe-derivation_sjs0.6_2.12/
implementation 'io.circe:circe-derivation_sjs0.6_2.12:0.13.0-M2'
// https://jarcasting.com/artifacts/io.circe/circe-derivation_sjs0.6_2.12/
implementation ("io.circe:circe-derivation_sjs0.6_2.12:0.13.0-M2")
'io.circe:circe-derivation_sjs0.6_2.12:jar:0.13.0-M2'
<dependency org="io.circe" name="circe-derivation_sjs0.6_2.12" rev="0.13.0-M2">
  <artifact name="circe-derivation_sjs0.6_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.circe', module='circe-derivation_sjs0.6_2.12', version='0.13.0-M2')
)
libraryDependencies += "io.circe" % "circe-derivation_sjs0.6_2.12" % "0.13.0-M2"
[io.circe/circe-derivation_sjs0.6_2.12 "0.13.0-M2"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.10
org.scala-js : scalajs-library_2.12 jar 0.6.32
io.circe : circe-core_sjs0.6_2.12 jar 0.13.0
io.github.cquiroz : scala-java-time_sjs0.6_2.12 jar 2.0.0-RC3

provided (2)

Group / Artifact Type Version
org.scala-lang : scala-compiler jar 2.12.10
org.scala-lang : scala-reflect jar 2.12.10

Project Modules

There are no modules declared in this project.

circe-derivation

Build status Coverage status Gitter Maven Central

This library provides macro-supported derivation of circe's type class instances. It differs from circe-generic in that this derivation is not based on Shapeless's generic representation of case classes and ADTs, and it is not intended to be as fully featured as io.circe.generic. Notably fully automatic derivation is a non-goal. The only targeted remaining feature for parity is constructor renaming.

In return for losing automatic derivation you get a library that has no dependencies apart from circe-core, should compile much more quickly in most cases, and supports some classes that circe-generic doesn't (e.g. Scrooge-generated representations of Thrift structs).

Who is this for?

There are already a lot of ways to define encoders and decoders in circe (or to avoid defining them using fully-automatic derivation). In general users who want to use generic derivation should stick to circe-generic, which is well-tested, robust, and provides a clear path from automatic generic derivation (which can be useful for initial exploration or in relatively simple applications) to semi-automatic derivation (which has some syntactic overhead but tends to compile much more quickly and to be easier to reason about).

Users who want the generic derivation experience but need particular functionality that isn't provided in circe-generic may be interested in circe-generic-extras, which supports transforming member names, using default values, etc. (at the expense of even slower compile times).

This library is for people who don't care about the full generic derivation experience but just want fast builds and instances that stay in sync with their definitions, and who don't mind a bit of boilerplate (a couple of lines per case class).

Note that the io.circe.derivation API is almost identical to io.circe.generic.semiauto, and in many situations it can be used as a drop-in replacement. If you're currently using circe-generic's deriveEncoder and deriveDecoder for case classes, but are still suffering from slow compilation, adding a circe-derivation dependency and switching the imports is probably worth a try.

Contributors and participation

This project supports the Scala code of conduct and we want all of its channels (Gitter, GitHub, etc.) to be welcoming environments for everyone.

Please see the circe contributors' guide for details on how to submit a pull request.

License

circe-derivation is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

io.circe

circe

Versions

Version
0.13.0-M2
0.13.0-M1
0.12.0-M7
0.12.0-M6
0.12.0-M5
0.12.0-M4
0.12.0-M3
0.12.0-M1
0.11.0-M3
0.11.0-M2
0.11.0-M1
0.10.0-M1
0.9.0-M5
0.9.0-M4
0.9.0-M3
0.9.0-M2
0.9.0-M1
0.8.0-M3
0.8.0-M2
0.8.0-M1
0.7.0-M2
0.7.0-M1