Braintree/src/main/java/com/braintreepayments/api/models/CardNonce.java
protected void fromJson(JSONObject json) throws JSONException {
        super.fromJson(json);

        JSONObject details = json.getJSONObject(CARD_DETAILS_KEY);
        mLastTwo = details.getString(LAST_TWO_KEY);
        mLastFour = details.getString(LAST_FOUR_KEY);
        mCardType = details.getString(CARD_TYPE_KEY);
        mThreeDSecureInfo = ThreeDSecureInfo.fromJson(json.optJSONObject(THREE_D_SECURE_INFO_KEY));
        mBinData = BinData.fromJson(json.optJSONObject(BIN_DATA_KEY));
    }
protected void fromJson(JSONObject json) throws JSONException {
        super.fromJson(json);

        JSONObject details = json.getJSONObject(CARD_DETAILS_KEY);
        mLastTwo = details.getString(LAST_TWO_KEY);
        mLastFour = details.getString(LAST_FOUR_KEY);
        mCardType = details.getString(CARD_TYPE_KEY);
        mThreeDSecureInfo = ThreeDSecureInfo.fromJson(json.optJSONObject(THREE_D_SECURE_INFO_KEY));
        mBinData = BinData.fromJson(json.optJSONObject(BIN_DATA_KEY));
    }
protected void fromJson ( JSONObject json ) throws JSONException { super . fromJson ( json ) ; JSONObject details = json . getJSONObject ( CARD_DETAILS_KEY ) ; mLastTwo = details . getString ( LAST_TWO_KEY ) ; mLastFour = details . getString ( LAST_FOUR_KEY ) ; mCardType = details . getString ( CARD_TYPE_KEY ) ; mThreeDSecureInfo = ThreeDSecureInfo . fromJson ( json . optJSONObject ( THREE_D_SECURE_INFO_KEY ) ) ; mBinData = BinData . fromJson ( json . optJSONObject ( BIN_DATA_KEY ) ) ; }
Populate properties with values from a {@link JSONObject} .

@param json {@link JSONObject}
@throws JSONException when parsing fails.
Populate properties with values from a { @link JSONObject } .