You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Kristof Lievens (JIRA)" <ji...@apache.org> on 2018/07/12 21:29:00 UTC

[jira] [Comment Edited] (OLINGO-1276) Client incorrectly parses stream with left brace in JSON string

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

Kristof Lievens edited comment on OLINGO-1276 at 7/12/18 9:28 PM:
------------------------------------------------------------------

I encountered the issue using the Olingo library in combination with the Outlook Rest API for Office 365. If you try to retrieve an email message with a '{' character in the mail body = bingo.

I considered adding a test case, but the original source code doesn't contain any test cases and the issue is located in a private method which makes it even more difficult to create one. I've updated the Description and as you can see I'm not the first one running into this issue.

The fix proposed in the patch file solved the issue for me.


was (Author: lievekr):
I encountered the issue using the Olingo library in combination with the Outlook Rest API for Office 365. If you try to retrieve an email message with a '{' character in the mail body = bingo.

I considered adding a test case, but the original source code doesn't contain any test cases and the issue is located in a private method which makes it even more difficult to create one. I've updated the Description an as you can see I'm not the first one running into this issue.

The fix proposed in the patch file solved the issue for me.

> Client incorrectly parses stream with left brace in JSON string
> ---------------------------------------------------------------
>
>                 Key: OLINGO-1276
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1276
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: (Java) V4 4.4.0
>            Reporter: Kristof Lievens
>            Priority: Blocker
>             Fix For: (Java) V4 4.5.0
>
>         Attachments: 0001-fixes-issue-when-JSON-stream-contains-a-left-brace-i.patch
>
>
> When a JSON string contains a '{' character, the response stream is incorrectly parsed into OData entities by the org.apache.olingo.client.api.domain.ClientEntitySetIterator class.
> Please check the patch file in attachment with a fix for the issue.
> This bug has already been reported in February 2015, see [https://github.com/apache/olingo-odata4/pull/4.] I didn't notice the fix linked to this Github issue before I started coding my own fix, but it looks pretty similar.



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