You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Feng Tian (JIRA)" <ji...@apache.org> on 2017/12/28 08:12:00 UTC
[jira] [Commented] (GEODE-2143) JSON deserialization fails if a
String contains an apostrophe
[ https://issues.apache.org/jira/browse/GEODE-2143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16305154#comment-16305154 ]
Feng Tian commented on GEODE-2143:
----------------------------------
This strange behavior, that is, replace ' with ", is at DataCommandResult.java, sanitizeJsonString
Can anyone explain the reason behind this replacement? I think ' can be valid char in json string.
> JSON deserialization fails if a String contains an apostrophe
> -------------------------------------------------------------
>
> Key: GEODE-2143
> URL: https://issues.apache.org/jira/browse/GEODE-2143
> Project: Geode
> Issue Type: Bug
> Components: gfsh
> Reporter: Jared Stewart
> Assignee: Kevin Duling
>
> Testing revealed this causes an issue when a String value contains a single apostrophe in it. For example: {{Customer customer = new Customer(1L, "Galen", "O'Sullivan", "555-11-2222");}}
> If you create a region and put in a value which is an instance of org.apache.geode.rest.internal.web.controllers.Customer, then gfsh blows up when attempting to display the value:
> {code}
> gfsh>query --query="select * from /customers"
> Result : true
> startCount : 0
> endCount : 20
> Rows : 1
> Value
> -------------------------------------------------------------------------------
> Error getting bean properties Expected a ',' or '}' at 86 [character 87 line 1]
> {code}
> It would be good to determine why this occurs to prevent the same error from arising with user-provided classes.
> The error occurs in the GfJsonObject, which will be replaced in an upcoming release.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)