private void writeRelationList ( String fieldName , Object value ) throws IOException { @ SuppressWarnings ( "unchecked" ) List < Relation > list = ( List < Relation > ) value ; if ( ! list . isEmpty ( ) ) { m_writer . writeStartList ( fieldName ) ; for ( Relation relation : list ) { m_writer . writeStartObject ( null ) ; writeIntegerField ( "task_unique_id" , relation . getTargetTask ( ) . getUniqueID ( ) ) ; writeDurationField ( "lag" , relation . getLag ( ) ) ; writeStringField ( "type" , relation . getType ( ) ) ; m_writer . writeEndObject ( ) ; } m_writer . writeEndList ( ) ; } }
Write a relation list field to the JSON file .