iothub/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/twin/ParserUtility.java [340:363]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static Object resolveJsonElement(JsonElement jsonElement)
    {
        if (jsonElement == null || jsonElement.isJsonNull())
        {
            return null;
        }
        else if (jsonElement.isJsonPrimitive())
        {
            return getJsonPrimitiveValue(jsonElement.getAsJsonPrimitive());
        }
        else if (jsonElement.isJsonObject())
        {
            return getJsonObjectValue(jsonElement.getAsJsonObject());
        }
        else if (jsonElement.isJsonArray())
        {
            return getJsonArrayValue(jsonElement.getAsJsonArray());
        }
        else
        {
            // shouldn't be here
            throw new IllegalArgumentException("Invalid DeviceMethodResponse payload: unknown payload type: " + jsonElement.getClass());
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



provisioning/provisioning-service-client/src/main/java/com/microsoft/azure/sdk/iot/provisioning/service/configs/ParserUtility.java [340:363]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static Object resolveJsonElement(JsonElement jsonElement)
    {
        if (jsonElement == null || jsonElement.isJsonNull())
        {
            return null;
        }
        else if (jsonElement.isJsonPrimitive())
        {
            return getJsonPrimitiveValue(jsonElement.getAsJsonPrimitive());
        }
        else if (jsonElement.isJsonObject())
        {
            return getJsonObjectValue(jsonElement.getAsJsonObject());
        }
        else if (jsonElement.isJsonArray())
        {
            return getJsonArrayValue(jsonElement.getAsJsonArray());
        }
        else
        {
            // shouldn't be here
            throw new IllegalArgumentException("Invalid DeviceMethodResponse payload: unknown payload type: " + jsonElement.getClass());
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



