Diet Tracker v1.6.0

Import and export file format

Diet Tracker exports and imports plain JSON, in two kinds of file. Export Foods writes a foods file (your food list), read by Import Foods. Export History writes a history file (days, logged entries, target changes and your profile), read by Import History. You can edit these files, move them between accounts, or build one yourself from another app's data.

The file

FieldTypeMeaning
formatstringRequired. Always "diet-tracker".
versionnumberRequired. Currently 1.
exportedAtstringOptional. When it was exported (ISO 8601); ignored on import.
foodslistYour food list. See Foods.
dayslistWeigh-ins and notes, one per date. See Days.
entrieslistWhat you ate. See Entries.
targetslistPlan, target and goal changes. See Targets.
profileobjectOptional sex, birth date and height. See Profile.

Dates are YYYY-MM-DD. Macros are in grams, calories in kcal, weight in pounds, body fat in percent. A missing number counts as 0 unless the table says it may be null. Items with a missing name or a malformed date are skipped.

Foods

Each food is one serving's worth of nutrition. Foods are matched by name, ignoring case.

FieldTypeMeaning
namestringRequired. Unique in your list, ignoring case.
servingstringWhat one serving is, such as "1 oz" or "1 cup (245g)".
netCarbsnumberNet carbs per serving (carbs minus fiber and sugar alcohols).
proteinnumberProtein per serving.
caloriesnumberCalories per serving.
notesstringOptional free text.
fdcIdnumber or nullThe USDA FoodData Central ID, if the food came from USDA.
favoritebooleanStarred for one-tap quick add on Today.
archivedbooleanHidden from Today, kept for past entries.
{
  "format": "diet-tracker",
  "version": 1,
  "exportedAt": "2026-10-30T21:00:00.000Z",
  "foods": [
    {
      "name": "String cheese",
      "serving": "1 stick (28g)",
      "netCarbs": 1,
      "protein": 6,
      "calories": 80,
      "notes": "",
      "fdcId": null,
      "favorite": true,
      "archived": false
    }
  ]
}

Days

FieldTypeMeaning
datestringRequired. The day, YYYY-MM-DD.
weightnumber or nullMorning weigh-in, in pounds.
bodyFatnumber or nullBody fat, in percent.
waistnumber or nullWaist, in inches.
notesstringThe day's notes.

Entries

Each entry is something you ate, with its totals for the amount eaten (not per serving), so it keeps its values even if the food is later edited or missing.

FieldTypeMeaning
datestringRequired. The day it was eaten.
mealstringbreakfast, lunch, dinner or snack (anything else becomes snack). day marks a whole-day total imported from an older log.
namestringRequired. The name shown in the diary.
foodstring or nullName of the food in your list this came from, which links it for editing the portion. null for a custom entry, or if there's no such food.
servingsnumberHow many servings of that food. Defaults to 1.
netCarbsnumberNet carbs eaten.
proteinnumberProtein eaten.
caloriesnumberCalories eaten.
sourcestringapp for entries logged in Diet Tracker (editable), import for read-only totals from an older log.

Targets

Each change applies from its start date until the next change, and carries the plan and goals as well as the daily limits. Files from before plans existed (without plan or goal fields) import as Keto with no goals.

FieldTypeMeaning
startDatestringRequired. First day these targets apply.
netCarbsnumberDaily net carbs maximum.
proteinnumberDaily protein minimum.
caloriesnumberDaily calories maximum.
planstringketo, or South Beach sb1, sb2 or sb3 (phases 1–3). Defaults to keto.
weightGoalnumber or nullGoal weight, lb.
bodyFatGoalnumber or nullGoal body fat, %.
lossRatenumber or nullTarget loss in lb per week; 0 means maintain.

Profile

Optional, and imported only into fields your account hasn't filled in; an import never overwrites your profile.

FieldTypeMeaning
sexstring or nullmale or female.
birthDatestring or nullYYYY-MM-DD.
heightnumber or nullInches.
{
  "format": "diet-tracker",
  "version": 1,
  "exportedAt": "2026-10-30T21:00:00.000Z",
  "days": [
    { "date": "2026-10-30", "weight": 190.4, "bodyFat": 22.5, "waist": 38, "notes": "Long hike" }
  ],
  "entries": [
    {
      "date": "2026-10-30",
      "meal": "lunch",
      "food": "Brisket",
      "name": "Brisket",
      "servings": 7,
      "netCarbs": 0,
      "protein": 49,
      "calories": 420,
      "source": "app"
    }
  ],
  "targets": [
    {
      "startDate": "2026-10-01",
      "plan": "sb1",
      "netCarbs": 50,
      "protein": 140,
      "calories": 1750,
      "weightGoal": 185,
      "bodyFatGoal": 20,
      "lossRate": 1
    }
  ],
  "profile": { "sex": "male", "birthDate": "1965-04-12", "height": 70 }
}

When a file overlaps your data

Before changing anything, an import checks for foods with the same name, target changes with the same start date, and days that already have entries, a weigh-in or notes. If there are any, it lists them (days as date ranges) and asks:

  • Keep mine: those foods, target changes and days stay exactly as they are; everything else in the file is added.
  • Replace with file: the file's version wins. Each overlapping day gets exactly the file's entries, weigh-in and notes.

Importing the same file twice never creates duplicates.

← Settings