package com.github.arteam.simplejsonrpc.core.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;

import org.jetbrains.annotations.NotNull;

/**
 * Date: 07.06.14
 * Time: 15:16
 * <p/>
 * Representation of a JSON-RPC error message
 */
public class ErrorMessage {

    @JsonProperty("code")
    private final int code;

    @NotNull
    @JsonProperty("message")
    private final String message;
    
    @JsonProperty("data")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private final JsonNode data;
    
    public ErrorMessage(@JsonProperty("code") int code,
                        @JsonProperty("message") @NotNull String message,
                        @JsonProperty("data") @NotNull JsonNode data) {
        this.code = code;
        this.message = message;
        this.data = data;
	}

    public int getCode() {
        return code;
    }

    @NotNull
    public String getMessage() {
        return message;
    }
    
    public JsonNode getData() {
        return data;
    }

    @Override
    public String toString() {
        return "ErrorMessage{code=" + code + ", message=" + message + ", data=" + data + "}";
    }
}

@@ -51,61 +51,8 @@
 n;%0A%0A
-import com.fasterxml.jackson.annotation.JsonInclude;%0A
 impo
@@ -160,56 +160,42 @@
 ort 
-com.fasterxml.jackson.databind.node.ObjectNode;%0A
+org.jetbrains.annotations.NotNull;
 %0Aimp
@@ -225,22 +225,23 @@
 ations.N
-otN
 ull
+able
 ;%0A%0A/**%0A 
@@ -530,49 +530,16 @@
    @
-JsonInclude(JsonInclude.Include.NON_NULL)
+Nullable
 %0A   
@@ -751,22 +751,23 @@
 ata%22) @N
-otN
 ull
+able
  JsonNod
@@ -995,20 +995,30 @@
 ;%0A    %7D%0A
+%0A
     
+@Nullable
 %0A    pub

Make `ErrorMessage.data` nullable