Here you can find the source of writeStringField(String name, String value, JsonGenerator jgen)
static public void writeStringField(String name, String value, JsonGenerator jgen) throws JsonProcessingException, IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; public class Main { static public void writeStringField(String name, String value, JsonGenerator jgen) throws JsonProcessingException, IOException { if (value != null) { jgen.writeStringField(name, value); }/*from w w w . j a va 2 s. c o m*/ } }