package io.kickflip.sdk.api.json;

import com.amazonaws.util.json.Jackson;
import com.google.api.client.util.Key;

import java.util.Map;

/**
 * JSON API object for Kickflip User
 *
 */
public class User extends Response {

    @Key("app")
    private String mApp;

    @Key("display_name")
    private String mDisplayName;

    @Key("name")
    private String mName;

    @Key("uuid")
    private String mUUID;

    @Key("extra_info")
    private String mExtraInfoStr;

    @Key("avatar_url")
    private String mAvatarUrl;

    public User(String app, String name, String uuid, Map extraInfo) {
        mApp = app;
        mName = name;
        mUUID = uuid;
        mExtraInfoStr = Jackson.toJsonString(extraInfo);
    }

    public User(){
        // Required Default Constructor
    }

    public String getApp() {
        return mApp;
    }

    public String getName() {
        return mName;
    }

    public String getDisplayName() {
        return mDisplayName;
    }

    public String getUUID() {
        return mUUID;
    }

    public Map getExtraInfo() {
        return Jackson.fromJsonString(mExtraInfoStr, Map.class);
    }

    public String getAvatarUrl() {
        return mAvatarUrl;
    }

}

@@ -654,16 +654,51 @@
 = uuid;%0A
+        if (extraInfo != null)%0A    
         
@@ -1113,16 +1113,48 @@
   return
+ (mExtraInfoStr == null ? null :
  Jackson
@@ -1194,16 +1194,17 @@
 p.class)
+)
 ;%0A    %7D%0A

Check your nulls