johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravisankar Challa (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JOHNZON-172) JsonPatchBuilder issue for a partcuilar scenario
Date Mon, 21 May 2018 09:36:00 GMT

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

Ravisankar Challa updated JOHNZON-172:
--------------------------------------
    Description: 
I am adding a failing test. org.apache.johnzon.core.JsonPointerImpl line 361 is causing the
issue.
{code:java}
@Test
void test1() {
       JsonProvider json = JsonProvider.provider();
       JsonObject jsonObject = json.createReader(new StringReader("{" +
               "    \"request\" : {" +
               "        \"test\" : {}" +
               "    }" +
               "}")).readObject();
       JsonPatchBuilder patchBuilder = json.createPatchBuilder();
       JsonObject result = patchBuilder.add("/name", "ravi").build().apply(jsonObject);
       assertEquals("{\"request\":{\"test\":{}},\"name\":\"ravi\"}", result.toString());
    }
{code}

  was:
I am adding a failing test
{code:java}
@Test
void test1() {
       JsonProvider json = JsonProvider.provider();
       JsonObject jsonObject = json.createReader(new StringReader("{" +
               "    \"request\" : {" +
               "        \"test\" : {}" +
               "    }" +
               "}")).readObject();
       JsonPatchBuilder patchBuilder = json.createPatchBuilder();
       JsonObject result = patchBuilder.add("/name", "ravi").build().apply(jsonObject);
       assertEquals("{\"request\":{\"test\":{}},\"name\":\"ravi\"}", result.toString());
    }
{code}


> JsonPatchBuilder issue for a partcuilar scenario
> ------------------------------------------------
>
>                 Key: JOHNZON-172
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-172
>             Project: Johnzon
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.7
>            Reporter: Ravisankar Challa
>            Priority: Major
>
> I am adding a failing test. org.apache.johnzon.core.JsonPointerImpl line 361 is causing
the issue.
> {code:java}
> @Test
> void test1() {
>        JsonProvider json = JsonProvider.provider();
>        JsonObject jsonObject = json.createReader(new StringReader("{" +
>                "    \"request\" : {" +
>                "        \"test\" : {}" +
>                "    }" +
>                "}")).readObject();
>        JsonPatchBuilder patchBuilder = json.createPatchBuilder();
>        JsonObject result = patchBuilder.add("/name", "ravi").build().apply(jsonObject);
>        assertEquals("{\"request\":{\"test\":{}},\"name\":\"ravi\"}", result.toString());
>     }
> {code}



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

Mime
View raw message