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

com.synopsys.integration.bdio.model.BdioIdAdapter Maven / Gradle / Ivy

Go to download

A library to allow for easy and clear creation of Black Duck I/O (bdio) documents.

There is a newer version: 26.0.13
Show newest version
/*
 * integration-bdio
 *
 * Copyright (c) 2022 Synopsys, Inc.
 *
 * Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
 */
package com.synopsys.integration.bdio.model;

import java.io.IOException;

import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

public class BdioIdAdapter extends TypeAdapter {
    @Override
    public void write(JsonWriter writer, BdioId value) throws IOException {
        writer.value(value.toString());
    }

    @Override
    public BdioId read(JsonReader in) throws IOException {
        return new BdioId(in.nextString());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy