mdedetrich / scalajson

ScalaJSON - JSON for Scala, currently contains minimal AST
BSD 3-Clause "New" or "Revised" License
55 stars 10 forks source link

Fix numericStringEquals with 0 condition #35

Closed mdedetrich closed 7 years ago

mdedetrich commented 7 years ago

As pointed out by @sirthias, numericStringEquals fails on this case "0" == "-0". @Ichoran this should interest you because you are using this equality method in your jsonal library (https://github.com/Ichoran/kse/tree/master/src/main/scala/jsonal)

@sirthias This is seperate to deciding whether or not we should even have numericStringEquals (not against removing numericStringEquals, its just a seperate issue)

mdedetrich commented 7 years ago

Closing this, misinterpreted what @sirthias was saying (I thought it was an actual bug however his complaint is that we do proper number checking)

Ichoran commented 7 years ago

Actually, I don't think that case ever comes up in Jsonal because it stores numbers identically equal to Double values as Doubles.