You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Hiroaki Ishiki (JIRA)" <ji...@apache.org> on 2019/04/20 14:33:00 UTC

[jira] [Created] (JOHNZON-209) JsonObject#toString() does not escape key names

Hiroaki Ishiki created JOHNZON-209:
--------------------------------------

             Summary: JsonObject#toString() does not escape key names
                 Key: JOHNZON-209
                 URL: https://issues.apache.org/jira/browse/JOHNZON-209
             Project: Johnzon
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.1.11
            Reporter: Hiroaki Ishiki


Hello.

{{JsonObject#toString()}} in the following code produces a corrupt JSON.

{{JsonObjectBuilder builder = Json.createObjectBuilder();}}
{{builder.add("foo\"bar", 42);}}
{{ String json = builder.build().toString();}}

Current implementation does not escape properly the key name part of the properties in JsonObject instances.

 



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