View Javadoc

1   package com.atlassian.marketplace.client.encoding;
2   
3   /**
4    * Indicates that an object returned by the server had some JSON parsing error that
5    * could not be described by one of the other {@link SchemaViolation} subclasses.
6    * @since 2.0.0
7    */
8   public class MalformedJson extends SchemaViolation
9   {
10      private final String message;
11      
12      public MalformedJson(Class<?> schemaClass, String message)
13      {
14          super(schemaClass);
15          this.message = message;
16      }
17      
18      @Override
19      public String getMessage()
20      {
21          return "Malformed JSON for " + getSchemaClass().getSimpleName() + ": " + message;
22      }
23  }