47degrees / helios

A purely functional JSON library for Kotlin built on Λrrow
https://47degrees.github.io/helios/
Apache License 2.0
169 stars 22 forks source link

JsString.encode() escape characters #132

Open ambrusadrianz opened 4 years ago

ambrusadrianz commented 4 years ago

with (tEncoder) { T.encode() } outputs invalid Json if the value contains a multiline string/string with quotes/etc.

Escaping of special characters should be done in the JsString encoder. This is a pretty major issue, I think. I'm eager to help with a PR if needed.

raulraja commented 4 years ago

@ambrusadrianz please feel free to send a PR with your suggestion. Thanks!