[ 
https://issues.apache.org/jira/browse/JOHNZON-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hiroaki Ishiki updated JOHNZON-209:
-----------------------------------
    Description: 
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.

 

  was:
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.

 


> 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
>            Priority: Trivial
>
> 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)

Reply via email to