Skip to content

double value (e.g., 1.0) is translated to ConfigInt(1) instead of ConfigDouble(1.0) #610

Open
@kyunam

Description

@kyunam
val config = ConfigFactory.parseString(
      """
        |decoders = [
        | { a : 1.0 },
        | { b : 2.2 },
        | { c : 3.3 }
        |]
      """.stripMargin)

    val decoders = config.getObjectList("decoders")
    decoders.foreach(co => println(co.toConfig.entrySet()))

prints

[a=ConfigInt(1)]
[b=ConfigDouble(2.2)]
[c=ConfigDouble(3.3)]`

I'm expecting [a=ConfigDouble(1.0)].

Thanks,
Kyunam

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions