Braintree/src/main/java/com/braintreepayments/api/models/PayPalConfiguration.java
public static PayPalConfiguration fromJson(JSONObject json) {
        if (json == null) {
            json = new JSONObject();
        }

        PayPalConfiguration payPalConfiguration = new PayPalConfiguration();
        payPalConfiguration.mDisplayName = Json.optString(json, DISPLAY_NAME_KEY, null);
        payPalConfiguration.mClientId = Json.optString(json, CLIENT_ID_KEY, null);
        payPalConfiguration.mPrivacyUrl = Json.optString(json, PRIVACY_URL_KEY, null);
        payPalConfiguration.mUserAgreementUrl = Json.optString(json, USER_AGREEMENT_URL_KEY, null);
        payPalConfiguration.mDirectBaseUrl = Json.optString(json, DIRECT_BASE_URL_KEY, null);
        payPalConfiguration.mEnvironment = Json.optString(json, ENVIRONMENT_KEY, null);
        payPalConfiguration.mTouchDisabled = json.optBoolean(TOUCH_DISABLED_KEY, true);
        payPalConfiguration.mCurrencyIsoCode = Json.optString(json, CURRENCY_ISO_CODE_KEY, null);

        return payPalConfiguration;
    }
public static PayPalConfiguration fromJson(JSONObject json) {
        if (json == null) {
            json = new JSONObject();
        }

        PayPalConfiguration payPalConfiguration = new PayPalConfiguration();
        payPalConfiguration.mDisplayName = Json.optString(json, DISPLAY_NAME_KEY, null);
        payPalConfiguration.mClientId = Json.optString(json, CLIENT_ID_KEY, null);
        payPalConfiguration.mPrivacyUrl = Json.optString(json, PRIVACY_URL_KEY, null);
        payPalConfiguration.mUserAgreementUrl = Json.optString(json, USER_AGREEMENT_URL_KEY, null);
        payPalConfiguration.mDirectBaseUrl = Json.optString(json, DIRECT_BASE_URL_KEY, null);
        payPalConfiguration.mEnvironment = Json.optString(json, ENVIRONMENT_KEY, null);
        payPalConfiguration.mTouchDisabled = json.optBoolean(TOUCH_DISABLED_KEY, true);
        payPalConfiguration.mCurrencyIsoCode = Json.optString(json, CURRENCY_ISO_CODE_KEY, null);

        return payPalConfiguration;
    }
public static PayPalConfiguration fromJson ( JSONObject json ) { if ( json == null ) { json = new JSONObject ( ) ; } PayPalConfiguration payPalConfiguration = new PayPalConfiguration ( ) ; payPalConfiguration . mDisplayName = Json . optString ( json , DISPLAY_NAME_KEY , null ) ; payPalConfiguration . mClientId = Json . optString ( json , CLIENT_ID_KEY , null ) ; payPalConfiguration . mPrivacyUrl = Json . optString ( json , PRIVACY_URL_KEY , null ) ; payPalConfiguration . mUserAgreementUrl = Json . optString ( json , USER_AGREEMENT_URL_KEY , null ) ; payPalConfiguration . mDirectBaseUrl = Json . optString ( json , DIRECT_BASE_URL_KEY , null ) ; payPalConfiguration . mEnvironment = Json . optString ( json , ENVIRONMENT_KEY , null ) ; payPalConfiguration . mTouchDisabled = json . optBoolean ( TOUCH_DISABLED_KEY , true ) ; payPalConfiguration . mCurrencyIsoCode = Json . optString ( json , CURRENCY_ISO_CODE_KEY , null ) ; return payPalConfiguration ; }
Parse an {@link PayPalConfiguration} from json.

@param json The {@link JSONObject} to parse.
@return An {@link PayPalConfiguration} instance with data that was able to be parsed from
the {@link JSONObject}.
Parse an { @link PayPalConfiguration } from json .