All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dikhan.pagerduty.client.events.utils.JsonUtils Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
package com.github.dikhan.pagerduty.client.events.utils;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;

public class JsonUtils {

    public static String getPropertyValue(HttpResponse jsonResponse, String key) {
        return jsonResponse.getBody().getObject().getString(key);
    }

    public static String getArrayValue(HttpResponse jsonResponse, String key) {
        return jsonResponse.getBody().getObject().getJSONArray(key).toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy