Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Deserializing error #22

Open
brystel opened this issue Apr 23, 2015 · 3 comments
Open

Deserializing error #22

brystel opened this issue Apr 23, 2015 · 3 comments

Comments

@brystel
Copy link

brystel commented Apr 23, 2015

Hello,

In case when the markup parameter is optional there could be happen deserializing error:

  Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: BEGIN_OBJECT expected, but met STRING
    Scopes: INSIDE_OBJECT>NAME>INSIDE_EMBEDDED_ARRAY>INSIDE_OBJECT
    Closed tags: 'programme'/2>'previously-shown'/3
    Token: null
    Tokens queue: null
    Values queue: , null

The markup might look like:

<previously-shown start="20080306000000" />

or

<previously-shown  />

My container class looks like:

public class PreviouslyShown {

    @SerializedName("@start")
    Date start;
}

Is it bug or there is any option to deserialize this markup?

@roman-mazur
Copy link
Contributor

Sorry for keeping silence so long. Could you make a test illustrating the issue. You can find example here https://github.com/stanfy/gson-xml/tree/master/src/test/java/com/stanfy/gsonxml/issues

@DenBond7
Copy link

Maybe I have this problem too. #14

@navy1978
Copy link

Same problem here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants