A diet based on healthy carbohydrates—rather than a low-fat or low-carbohydrate diet—offers the best chance of keeping weight off without bringing unwanted side effects, a study published Tuesday in the Journal of the American Medical Association suggests.

Study participants following a low-glycemic-index diet, which is similar to a Mediterranean diet and focuses on fish, fruit, vegetables, nuts and whole grains, also saw improved cholesterol levels and other important markers that lower the risks of developing heart disease...