skip to Main Content

JSON parsing removes decimal trailing zeros

I have a Json string, after parsing I want it to remain in decimal form. import play.api.libs.json._ val jsonString = """{"value":2.0}""" println(jsonString) println(Json.parse(jsonString)) The output of the code above is: {"value":2.0} {"value":2} I need it to be {"value":2.0} {"value":2.0}

VIEW QUESTION
Back To Top
Search