class RecordWriter {

    public static void putFromJson(final String json, final Record record) {
        final JsonObject jsonObject = gson.fromJson(json, JsonObject.class);
        // JSON data from CCL is presumed to be all upper-case
        final String recordNameUpper = record.getName().toUpperCase(Locale.getDefault());
        if (!jsonObject.has(recordNameUpper))
            throw new IllegalArgumentException("JSON does not contain record " + recordNameUpper);

        putFromJsonObject(jsonObject.getAsJsonObject(recordNameUpper), record);
    }

}