johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [johnzon] rmannibucau edited a comment on issue #45: [JOHNZON-277] Fails to deserialize inner empty JSON block {} at OBJECT_START
Date Fri, 20 Sep 2019 12:02:57 GMT
rmannibucau edited a comment on issue #45: [JOHNZON-277] Fails to deserialize inner empty JSON
block {} at OBJECT_START
URL: https://github.com/apache/johnzon/pull/45#issuecomment-533524569
 
 
   --- a/johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/serializer/JohnzonDeserializationContext.java
       +++ b/johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/serializer/JohnzonDeserializationContext.java
       @@ -82,6 +82,8 @@ public class JohnzonDeserializationContext implements DeserializationContext
{
                        return JsonValue.NULL;
                    case VALUE_NUMBER:
                        return jsonp.createValue(parser.getBigDecimal());
       +            case END_OBJECT:
       +                return builderFactory.createObjectBuilder().build();
       +            case END_ARRAY:
       +                return builderFactory.createArrayBuilder().build();
                    default:
                        throw new JsonParsingException("Unknown structure: " + next, parser.getLocation());
                }
   
   
   seems enough, do you want to give it a try?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message