public static void writeLongs ( String fieldName , List < Long > data , JsonGenerator gen ) throws IOException { if ( ! data . isEmpty ( ) ) { gen . writeArrayFieldStart ( fieldName ) ; for ( long d : data ) { writeLong ( d , gen ) ; } gen . writeEndArray ( ) ; } }
Writes a long array if not empty using quotes for values that are too big .