johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JOHNZON-164) Non Spec conform handling of illegal json
Date Wed, 28 Mar 2018 16:57:00 GMT
Mark Struberg created JOHNZON-164:
-------------------------------------

             Summary: Non Spec conform handling of illegal json
                 Key: JOHNZON-164
                 URL: https://issues.apache.org/jira/browse/JOHNZON-164
             Project: Johnzon
          Issue Type: Bug
          Components: JAX-RS, JSON-B
    Affects Versions: 1.1.7
            Reporter: Mark Struberg
            Assignee: Mark Struberg
             Fix For: 1.1.8


If we receive wrong information (e.g. an illegal Base64 encoded byte[]) then we currently
throw an IllegalArgumentException.

The following behaviour is defined in the specifications:

According to the JSON-B spec we should throw a JsonbException
https://static.javadoc.io/javax.json.bind/javax.json.bind-api/1.0/index.html?javax/json/bind/annotation/package-summary.html

If native JSON-P is being used we should throw a JsonParsingException
https://docs.oracle.com/javaee/7/api/javax/json/JsonReader.html#read--



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

Mime
View raw message