private static void writeDependencyCommonFields(IonWriter writer, DependencyNode node)
    throws IOException {
    writeLong(writer, "id", node.getId());
    ResolutionState state = node.getResolutionState();
    int ordinal = state == null ? -1 : state.ordinal();
    writeLong(writer, "resolutionState", ordinal);
    writeString(writer, "selectionReason", node.getSelectionReason());
  }
private static void writeDependencyCommonFields(IonWriter writer, DependencyNode node)