I'm using an SDK which uses Moshi underneath to pr...
# squarelibraries
j
I'm using an SDK which uses Moshi underneath to provide some data, and the fields aren't being escaped. I'm trying to figure out if this is standard behavior or not.. JSON returned from the server:
Copy code
{
  "body": "This is a test",
  "body_html": "<div class=\"body\">This is a test</div>"
}
gets deserialized into a model by Moshi with a codegen'd adapter, and at this point what would you expect the string value of
model.bodyHtml
to be?: 1.
<div class=\"body\">This is a test</div>
2.
<div class="body">This is a test</div>
I feel like I'm having a mind blank here. I thought Moshi escaped it for us, but that's not the behavior I'm currently seeing? or am I remembering all wrong?