openrtb-core/src/main/java/com/google/openrtb/json/OpenRtbJsonWriter.java
public final void writeBidResponse(BidResponse resp, JsonGenerator gen) throws IOException {
    gen.writeStartObject();
    writeBidResponseFields(resp, gen);
    writeExtensions(resp, gen);
    gen.writeEndObject();
    gen.flush();
  }
public final void writeBidResponse(BidResponse resp, JsonGenerator gen) throws IOException {
    gen.writeStartObject();
    writeBidResponseFields(resp, gen);
    writeExtensions(resp, gen);
    gen.writeEndObject();
    gen.flush();
  }
Serializes a {@link BidResponse} to JSON, with a provided {@link JsonGenerator}
which allows several choices of output and encoding.