Been trying to make a ktor server but unable to un...
# ktor
r
Been trying to make a ktor server but unable to understand why the response is escaping string values like the following
Copy code
{
  "address": {
    "id": 1,
    "firstname": "\"Rahul\"",
    "lastname": "\"Rawat\"",
    "address1": "\"Address1\"",
    "address2": "\"Address2\"",
    "city": "\"City\"",
    "zipCode": "\"ZipCode\"",
    "phone": "\"80808080\"",
    "state_name": "\"State\"",
    "alternative_phone": "\"Alternative\"",
    "company": "\"Company\"",
    "state_id": 1,
    "country_id": 2
  }
}
My server looks like the following
Copy code
install(ContentNegotiation) {
            json(Json {
                prettyPrint = true
                isLenient = true
            })
        }
Please someone help.
d
What does the response type look like?
r
Json as you can see in the following
d
Are you sure you haven't put the
"
in the properties by accident before responding?
☝️ 1
r
Now I feel stupid 😅
d
😄
r
Thanks @Dominaezzz
d
np 👍🏼