Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1503

JsonDeserializer fails to recognize type of entity type collection properties with EDM

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (Java) V4 4.7.1
    • None
    • odata4-client
    • None

    Description

      In  org.apache.olingo.client.core.serialization.JsonDeserializer:345
       

      final Object value = fromComplex((ObjectNode) child, codec);
      if (childType != null) {
          ((ComplexValue)value).setTypeName(childType.external());
      }
      

       sets the collection TypeName prefixed with "#" and thus it is is not found in the Edm.

      This causes properties in ComplexValue collection elements (e.g. date) to be interpreted as String.

      Some anecdotal testing has demonstrated that using childType.internal() fixes the issue.

      Unfortunately I am pressed for time an unable to provide proper steps to verify it, but I figured if it is indeed a mistake of using external() instead of internal() whoever wrote this code might be able to recognize it and fix it.

      ramya vasanth if I'm not mistaken...

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            krico Christian Asmussen

            Dates

              Created:
              Updated:

              Slack

                Issue deployment