Skip to content

Commit

Permalink
Fix #7: Document limitations regarding numerical types
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas committed Jan 2, 2018
1 parent f92dc1a commit d534766
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
- Update circe to version [0.9.0](https://github.com/circe/circe/releases/tag/v0.9.0).
- Update to [config 1.3.2].
- Update Scala to 2.11.12.
- Document limitations regarding numerical types. [#7]
- Configure MiMa. [#4], [#8]
- Build using sbt 1.0. [#9]

[#4]: https://github.com/circe/circe-config/issues/4
[#7]: https://github.com/circe/circe-config/issues/7
[#8]: https://github.com/circe/circe-config/pull/8
[#9]: https://github.com/circe/circe-config/pull/9
[config 1.3.2]: https://github.com/lightbend/config/blob/master/NEWS.md#132-october-6-2017
Expand Down
9 changes: 9 additions & 0 deletions src/main/scala/io.circe.config/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ import scala.collection.JavaConverters._
* circe-config: A [[https://github.com/lightbend/config Typesafe config]]
* wrapper powered by [[io.circe circe]].
*
* @note '''Limitations for numerical types''':
* Typesafe config uses Java's int, long and double types to represent numbers.
* In some cases, double values may be represented internally as long after a
* roundtrip since the [[https://github.com/lightbend/config/blob/master/HOCON.md HOCON]]
* formatting is not stable. Also, precision may be lost when converting from
* circe's [[io.circe.JsonNumber JsonNumber]] to Typesafe config's number
* representation (as can be seen in the
* [[https://github.com/circe/circe-config/blob/master/src/test/scala/io.circe.config/CirceConfigLaws.scala#L16-L40 test for the printer laws]]).
*
* @example
* {{{
* scala> import com.typesafe.config.ConfigFactory
Expand Down

0 comments on commit d534766

Please sign in to comment.