You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2018/05/09 09:50:00 UTC

[jira] [Commented] (LANG-1395) JsonToStringStyle does not escape double quote in a string value

    [ https://issues.apache.org/jira/browse/LANG-1395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468620#comment-16468620 ] 

Sebb commented on LANG-1395:
----------------------------

It looks like the code needs to use the (now deprecated) StringEscapeUtils#escapeJson() method to transform strings

> JsonToStringStyle does not escape double quote in a string value
> ----------------------------------------------------------------
>
>                 Key: LANG-1395
>                 URL: https://issues.apache.org/jira/browse/LANG-1395
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Major
>
> From the user mailing list [1]:
> JsonToStringStyle does not escape double quote in a string value
> JSON requires double-quote to be escaped with a back-slash.
> This does not happen currently.
> Nor does the code translate control characters such as NL and FF correctly.
> AFAICT the code is only guaranateed to process alphanumeric strings correctly.
> [1] https://lists.apache.org/thread.html/10bb632e86c473d58656431ad2702e058c58585e1a2edf1bf4a46824@%3Cuser.commons.apache.org%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)