Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
titleAccurate

Code Block
languagejs
linenumberstrue
{
  "config": { // All clients listen here permanently
    "articleBaseUrl": "http://cloud-storage.com/articles/",
  },   "userslegalsUrl": {"http://impossible.am/legalstuff/",
    "user_id_01for7MW": {
// Clients listen here permanently
      "usernamefacebookPage": "user",
      "emailfacebookGroup": "user@somewhere.com",
      "fitnessLevelinstagramUser": 10"",
      "fitnessBiasfaqsUrl": 1,""
    },
    "createdforAfterburner": 987654345,{
// Unix timestamp (seconds)       "maxImpactCreditfacebookPage": 3"",
      "impactCreditfacebookGroup": 0.9"",
      "updatedICinstagramUser": 987654345, // Unix timestamp (seconds)"",
      "apnIdsfaqsUrl": []""
    }
  },
  "visibleWorkoutDefsusers": {
// Workout defs that are visible to the user
    "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged
and ChildRemoved       "wktdef1username": {
 "user", // [default:null]
      "recommendedemail": "user@somewhere.com", // [default:null]
Not recommended, just visible 		"locked": true, 		"lockStringfitnessLevel": "Finish 6 more workouts before Thurs 9th June",10, // [default:10]
         "MWIfitnessBias": 0.541, // [default:1]
      "breakdowncreated": 987654345, {// Unix timestamp (seconds) [default:0]
      "epocmaxImpactCredit": 0.13, // [default:0]
        "cardioimpactCredit": 0.19,    // [default:0]
      "metabolicupdatedIC": 0.1987654345, // Unix timestamp (seconds) [default:0]
      "strengthtriggersFired": 0.1
        }
 { "triggerId_01": true, "triggerId_02": true }, // [default:null]
    },       "wktdef2sessions": {
        "recommendedfor7MW": "You need to work on your abs"2, // Recommended[default:0]
and reason for this to be shown to user 		"lockedforAfterburner": 0 false,
		"lockString": "",
 // [default:0]
      },
      "MWItotalActivities": 0.542, // [default:0]
      "breakdowntotalActivities7MW": {1, // [default:0]
        "epoctotalActivitiesAF": 0.1, // [default:0]
        "cardiofirstActivity7MW": 0.1987654345, // Unix timestamp (seconds) [default:0]
      "metabolicfirstActivityAF": 0.1,
   987654345, // Unix timestamp (seconds) [default:0]
      "strengthtimedNotifSeqVersion": 0.1, // Version of timed notif sequence user is }on (server   use) [default:0]
  }     }
  },
  "workouts": {
    "activities": {"testMode": false, // Puts the app in 'test mode' for this user [default:false]
       "user_id_01notifTokens": { // ClientsAPN listentokens herefor permanentlythe for ChildAdded, ChildChanged and ChildRemoveduser's devices [default:null]
        "for7MW": { "workoutapn_id_01token": {true }, // Clients post new activity to here with auto id, server listens
 Where 'api_token' is the actual token string
        "workoutDefIdforAfterburner": { "wktdef1apn_token",: true }
      }
 "finish": 987654345, // Unix}
timestamp (seconds) },
  "visibles":  {
    "exertionworkoutDefs": 0.5,
   { // Workout defs that are visible to the user
      "finalHeartRateBPMuser_id_01": 160,{ 
         "finalHeartRateDelayfor7MW": 0{ // Length7MW ofclients delaylisten (inhere secs)permanently afterfor theChildAdded, workoutChildChanged beforeand theChildRemoved
HR was measured (0 if they didn't press the 'start again' button) "wktdef1": {
        }    "recommended": "", // }Not recommended, just visible  },// [default:null]
    "results": {       "user_id_01locked": {true, // ClientsNot listenavailable hereto permanentlyuser for(unlocked ChildAdded,via ChildChangedIAP and ChildRemoved/or journey trigger) [default:false]
  	        "workout_id_01lockString": { "Finish 6 more workouts before Thurs 9th June", // ServerDisplayed to posts workout results hereuser [default:null]
            "workoutDefIdMWI": "wktdef1"0.54, // [default:0.5]
            "finishbreakdown": 987654345,{
// Unix timestamp (seconds)           "AWIepoc": 0.1, // [default:0.25]
        "responseDuration": 3456,           "intensity"cardio": 0.91, // [default:0.25]
        "responses": {     "metabolic": 0.1, // [default:0.25]
    "cardio": {         "strength": 0.1 // [default:0.25]
  "stress": 43,         }
     "magnitudeProduct": 0.6,    },
          "halflifeProductwktdef2": 0.3,
 {
            "durationrecommended": 5678,"You need to work on your abs", // Recommended and reason for this to  "volume": 3456be shown to user
            "locked": }false, // Available to user
            "strengthlockString": {"",
              "stressMWI": 430.54,
              "magnitudeProductbreakdown": 0.6,{
              "halflifeProductepoc": 0.31,
              "durationcardio": 56780.1,
              "volumemetabolic": 34560.1,
            },  "strength": 0.1
         "epoc": {  }
          }
 "stress": 43,      },
        "magnitudeProductforAfterburner": 0.6,
      { // Afterburner clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
          "halflifeProductwktdef1": 0.3,{
              "durationrecommended": 5678"", // Not recommended, just visible
  	        "volumelocked": 3456
 false, // Available to user
  	        }"lockString": "",
            "metabolicMWI": {0.54,
              "stressbreakdown": 43,{
              "magnitudeProductepoc": 0.61,
              "halflifeProductcardio": 0.31,
              "durationmetabolic": 56780.1,
              "volumestrength": 34560.1
            }
          },
          "muscleGroupswktdef2": {
            "upperrecommended": 0.3,
            "lower": 0.3,"You need to work on your abs", // Recommended and reason for this to be shown to user
            "corelocked": 0.4
   false, // Available to user
      }      "lockString": "",
 }       }     }"MWI": 0.54,
   },   "afterburn": {     "user_id_01breakdown": {
   // Clients listen here permanently       "startepoc": 3456789870.1,
  // Unix timestamp (seconds)       "response  "cardio": { 0.1,
              "resolutionmetabolic": 6000.1,
  //   Secs         "epocstrength": [0.6,0.5,0.3,0.2,0.1,0.0],1
            }
"cardio": [0.6,0.5,0.3,0.2,0.1,0.0],         "strength": [0.6,0.5,0.3,0.2,0.1,0.0],}
        }
   "metabolic": [0.6,0.5,0.3,0.2,0.1,0.0]  }
    },
    "routines": {
   "impactCredit   "user_id_01": { 
        "resolutionfor7MW": 600,{ // Secs7MW clients listen here permanently for ChildAdded, ChildChanged  "futureCredit": 0.9,and ChildRemoved
          "pending": [0.0,0.1,0.2,0.3,0.4,0.5]routine_id_01": {
      },       "messageslocked": [true, // Messages displayed below the radar chartNot available to user (unlocked via IAP and/or journey trigger) [default:false]
         {"t":0,"body":"Restoring body temperature", "detaillockString": ""},Finish 6 more workouts before Thurs 9th June"  {"t":120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"}// Displayed to user [default:null]
          ]},
          "notificationsroutine_id_02": [{
            {"tlocked":6000,"body":"Great workout! You're still burning calories and building strength."},
 true,
            {"tlockString":14400,"body ":"Fitness test// unlocked! You're ready to take another fitness test."}
No lock string, so only unlocked via IAP [default:null]
     ]     },
  },   "timelineArticles": {     "userroutine_id_0103": {
// Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved       "article_id_01"locked": {
        "date": 4567890987false, // UnixAvailable
  timestamp (seconds)         "titlelockString": "Post title",
        "read": false, }
       "location },
        "forAfterburner": { "post/location.html"
      }
    }
  },
  "journeyTriggers: {
	"trigger01// 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
          "routine_id_03": {
	    "category": "achievement", 	  "triggerType": "activitiesInDays", 	  "triggerValAlocked": 7false, // Available
7 activities 	  "triggerValB": 7, // in 7 days 	  "actionslockString": [ 		{"action":"post","itemId":"articleId","data":"e.g. url parameters"},
		{"action":"unlock","itemId":"workoutDefId","data":""}
	},
	"trigger02": {
	  "category": "education",
	  "triggerType": "totalActivities",
	  "triggerValA": 10, // 10 activities
	  "triggerValB": 0, // Not used
	  "actions": [
		{"action":"post","itemId":"articleId","data":"e.g. url parameters"}
	}
  },
  "definitions": {
	"version": 1,
    "exerciseDefs"
          }
        }
      }
    }
  },
  "workouts": {
    "activities": {
      "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
        "exdef1workout_id_01": { // Clients post new activity to here with "behaviour": 1,auto id, server listens
          "titleworkoutDefId": "Crucheswktdef1", // [no default]
          "videofinish": "01-Crunches.mp4"987654345, // Unix timestamp (seconds) [default:0]
          "imageiterations": "abs"1.5, // Number of times it was performed  "desc": "A crunch begins with lying face up on the floor with knees bent. The movement begins by curling the shoulders towards the pelvis. The hands can be behind or beside the neck or crossed over the chest. Injury can be caused by pushing against the head or neck with hands.",
        "subtitle": "Target your abs for a balanced set of stomach muscles.",
        "calPerSec": 5,
        "skill": 0.2,
 [default:1]
          "exertion": 0.5, // [default:0.5]
          "finalHeartRateBPM": 160, // [default:140]
          "finalHeartRateDelay": 0, // Length of delay (in secs) after the workout before the HR was measured (0 if they didn't press the 'start again' button) [default:0]
		  "app": "7MW" // Short code of the app the activity was performed in: 7MW, AF, etc [default:null]
        }
      "strength": 0.7,}
    },
    "cardioresults": 0.1,
 {
      "epocuser_id_01": 0.4,
        "metabolic": 0.4,{ // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
         "upperworkout_id_01": 0.5,
     { // Server posts workout results here
  "core": 0.5,         "lowerworkoutDefId": 0.5
  "wktdef1", // [no default]
   },       "exdef2finish": {987654345, // Unix timestamp (seconds) // [no default]
 "behaviour": 1,         "titleAWI": "Squats"0.1, // [default:0.5]
          "videoresponseDuration": "02-Squats.mp4",3456, // [default: 0]
          "imageintensity": "abs"0.9, // [default:0.5]
		      "descapp": "7MW"Squats, are// anShort excellentcode exerciseof forthe trainingapp the loweractivity bodywas andperformed corein: muscles7MW, ifAF, doneetc regularly[no theydefault]
help to define thighs and buttocks.",
        "subtitleresponses": "Train your lower body and core.",{ // [no default]
            "calPerSeccardio": 4,{
              "skillstress": 0.243,
        "strength      "magnitudeProduct": 0.6,
              "cardiohalflifeProduct": 0.3,
        "epoc": 0.4,         "metabolicduration": 0.6,
   5678,
    "upper": 0.5,         "corevolume": 0.5,3456
          "lower": 0.5 },
     },       "exdef3strength": {
        "behaviour      "stress": 1,43,
              "titlemagnitudeProduct": "Planks"0.6,
        "video      "halflifeProduct": "03-Plank.mp4",0.3,
              "imageduration": "abs"5678,
              "descvolume": "The3456
plank helps you to build strength in your core, upper and lower body},
so its a good full body work out. You do not need any equipment to perform this exercise all you need is a bit of space, and it really helps improve flexibility by stretching muscles and will improve posture if performed regularly.",
        "subtitle": "Work out your core muscles.""epoc": {
              "stress": 43,
              "magnitudeProduct": 0.6,
        "calPerSec": 6,         "skillhalflifeProduct": 0.3,
              "strengthduration": 0.55678,
        "cardio": 0.2,         "epocvolume": 3456
0.4,         "metabolic": 0.4,   },
            "uppermetabolic": 0.5,{
              "corestress": 0.543,
        "lower      "magnitudeProduct": 0.56,
       },       "exdef4halflifeProduct": {0.3,
              "behaviourduration": 15678,
        "title      "volume": "Push3456
Ups",         "video": "04-PushUps.mp4",  }
      "image": "abs",   },
          "descmuscleGroups": "The{
push up is a great muscle toning exercise for the arms, chest, triceps and the front of the shoulders, whether performed on the knees or toes this is a good strength building exercise that can be performed anywhere.", "upper": 0.3, // [default: 0.3]
            "lower": 0.3, // [default: 0.3]
            "subtitlecore": "Train your upper body.",0.4 // [default: 0.3]
        "calPerSec": 3, }
       "skill": 0.1, }
      }
 "strength": 0.8,  }
  },
   "cardioafterburn": 0.2,{
    "user_id_01": { // Clients "epoc": 0.6,
listen here permanently
       "metabolicstart": 0.6345678987, // Unix timestamp (seconds) // [no default]
 "upper": 0.5,    "response": {    "core": 0.5,// [default:null]
        "lowerresolution": 0.5
 600, // Secs
    },
      "exdef5epoc": {[0.6,0.5,0.3,0.2,0.1,0.0],
        "behaviourcardio": [0.6,0.5,0.3,0.2,0.1,0.0],
        "titlestrength": "Side Plank",
 [0.6,0.5,0.3,0.2,0.1,0.0],
        "videometabolic": "06-SidePlank.mp4",[0.6,0.5,0.3,0.2,0.1,0.0]
      },
      "imageimpactCredit": "abs", { // [default:null]
        "descresolution": "The side plank helps you to build strength in your core, upper and lower body so its a good full body work out. It helps improve flexibility by stretching muscles and will improve posture if performed regularly.",
 600, // Secs
        "futureCredit": 0.9,
        "pending": [0.0,0.1,0.2,0.3,0.4,0.5]
      },
      "subtitlemessages": "Target[ your// absMessages fordisplayed abelow balancedthe setradar of stomach muscles.",chart [default:null]
        {"calPerSect": 5,
        "strength": 0.70,"body":"Restoring body temperature", "detail": ""},
        {"cardiot": 0.2,
        "epoc": 0.5,120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"}
        "metabolic": 0.5,
 ],
      "skillnotifications": 0.2,[ // [default:null]
        {"uppert": 0.5,
        "core": 0.56000,"body":"Great workout! You're still burning calories and building strength."},
        "lower{"t":14400,"body":"Fitness 0.5test unlocked! You're ready to take another fitness test."},
      "exdef6":]
{    }
  },
  "behaviourtimelineArticles": 1,
   {
    "titleuser_id_01": "Jumping Jacks",
        "video": "33-JumpingJack.mp4",
 { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
      "imagearticle_id_01": "abs",{
        "descdate": "Jumping Jacks are the original circuit training exercise that evenly targets your muscle groups to elicit a strong cardiovascular response.",
4567890987, // Unix timestamp (seconds) // [no default]
        "title": "Post title", // [no default]
        "subtitleread": "Get those heart muscles jumping!",false, // [default:true]
          "calPerSeclocation": 6"post/location.html", // [no default]
		"icon": "default",    "strength": 0.1,// [default:"default"]
        "appMask": "cardio": 0.8,7MW,AF", // [default: all apps]
        "metabolicpromptRating": 0.6,
 true // [default:false]
      }
"epoc": 0.6,   }
  },
  "skilldefinitions": 0.1,{
    "routines": { //  "upper": 0.5,
 Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
      "coreroutine_id_01": 0.5,{
        "lowertitle": 0.5"The Wonder Routine", // [no default]
 },       "exdef7image": {"wonder-routine", // [default:"default-routine"]
        "behaviourdesc": 1"Big long description", // [default:null]
        "titleappStoreId7MW": "Burpeesroutine01", // StoreKit product id [default:null]
        "videoin7MW": "42-Burps.mp4"true, // For server use [default:false]
        "imageinAfterburner": "abs"false, // For server use [default:false]
   "desc": "Burpees are a full body exercise which work virtually every muscle in the body, this means that you can burn more calories in a lot less time.",
"lockedIn7MW": false, // For server use [default:false]
        "lockedInAfterburner": false, // For server use [default:false]
        "subtitlevideo": "Burpees", are tough but well worth your time.",// [default:null]
          "calPerSecminFitnessLevel": 64, // [default:1]
        "strengthworkoutDefs": 0.2,
  { // [no default]
     "cardio": 0.9,    "wktdef1": {
   "metabolic": 0.6,         "epoctype": 0.61,    // [default:1]
    "skill": 0.3,
        "uppertitle": 0.5"Aerobic", // [no default]
     "core": 0.5,
        "lowerimage": 0.5
   "abs", // [default:"default"]
  }     },     "workoutDefsdesc": { "Aerobic Basic Movement", // Clients[default:null]
listen here permanently for ChildAdded, ChildChanged and ChildRemoved       "wktdef1breakDuration": {5, //   // [default:10]
    "type": 1,         "titleappStoreId7MW": "Aerobicworkout01", // StoreKit product id [default:null]
   "image": "abs",         "desclocked": "Aerobic Basic Movement"false, // For server use     "breakDuration[default:false]
			"MWI": 5,
		"appStoreId: "workout01",0.54, // [default:0.5]
            "exercises": [ // [no default]
              {
                "id": "exdef1", // [no default]
                "duration": 20 // [no default]
              },
              {
                "id": "exdef2",
                "duration": 15
              },
              {
                "id": "exdef3",
                "duration": 10
              },
              {
                "id": "exdef4",
                "duration": 5
              },
              {
                "id": "exdef5",
                "duration": 10
          }    }
            ],
            "adaptiveStress": {
              "strength": 0.2, // [default:1]
              "cardio": 0.9, // [default:1]
              "metabolic": 0.6, // [default:1]
              "epoc": 0.6 // [default:1]
            },
            "muscleStress": {
              "upper": 10, // [default:1]
              "lower": 10, // [default:1]
              "core": 10 // [default:1]
      }       },
      "wktdef2": {   }
     "type": 1,  }
      "title": "Thai Boxing",}
     },
    "imageexerciseDefs": "abs",
        "desc": "Boxing With Kicking",
  { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
       "breakDurationexdef1": 4,
		"appStoreId: "workout02",{
         "exercisesbehaviour": [1, // [default:1]
        {
   "title": "Cruches", // [no default]
        "idvideo": "exdef501-Crunches.mp4", // [no default]
         "durationimage": 15
 "abs", // [default:"default"]
        },
          {
            "id": "exdef3",
            "duration": 10
          },
 "desc": "A crunch begins with lying face up on the floor with knees bent. The movement begins by curling the shoulders towards the pelvis. The hands can be behind or beside the neck or crossed over the chest. Injury can be caused by pushing against the head or neck with hands.", // [default:null]
        {
            "id": "exdef1",
  "subtitle": "Target your abs for a balanced set of stomach muscles.", // [default:null]
         "durationcalPerSec": 5, // [default:0]
        }
        ],"skill": 0.2, // [default:0.5]
        "stressstrength": {
 0.7, // [default:0.5]
        "strengthcardio": 0.21, // [default:0.5]
        "cardioepoc": 0.94, // [default:0.5]
        "metabolic": 0.64, // [default:0.5]
        "epocupper": 0.65, // [default:0.5]
         },
"core": 0.5, // [default:0.5]
        "muscleStresslower": {
 0.5, // [default:0.5]
        "upperneedsHalfwaySwap": 10,false // [default:false]
        "lower": 10,
  },
       "coreexdef2": 10{
        }
      },
      "wktdef3"behaviour": {1,
        "typetitle": 1"Squats",
        "titlevideo": "Silat02-Squats.mp4",
        "image": "abs",
        "desc": "TraditionalSquats Martialare Arts",an excellent exercise for training the lower body and "breakDuration": 5,
		"appStoreId: "workout03",
        "exercises": [core muscles, if done regularly they help to define thighs and buttocks.",
        "subtitle": "Train your {lower body and  core.",
        "idcalPerSec": "exdef4"4,
 
          "durationskill": 50.2,
          }"strength": 0.6,
        "cardio": 0.3,
{             "idepoc": "exdef5",
 0.4,
          "durationmetabolic": 100.6,
        "upper": 0.5,
}         ]"core": 0.5,
        "adaptiveStresslower": {
 0.5,
        "strengthneedsHalfwaySwap": 0.2,true
      }
   "cardio": 0.9 },
    "journeyTriggers": {
      "metabolicforAfterburner": 0.6,
 {
        "epoctrigger01": 0.6{
        },
        "muscleStress"category": {"achievement",
          "uppertriggerType": 10"activeDaysInWeeks",
          "lowercondition1": 104, // 4 active days
          "corecondition2": 108, // every week for 8 weeks
  }       },       "wktdef4"actions": {
  [
     "type": 1,         {"titleactionType": "OCDpostArticle",
        "image"articleId": "absarticle_id_01",
        "desc": "Modern Exercise","data":"e.g. url parameters"},
          "breakDuration": 6,
		"appStoreId: "workout04",
        "exercises": [ {"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
          {]
            "id": "exdef3"},
            "durationtrigger02": 20{
          }"category": "education",
          {
"triggerType": "totalActivities",
           "idcondition1": "exdef2",
 10, // 10 activities
          "durationcondition2": 150, // Not used
       },   "actions": [
      {             "id": "exdef4",{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}
          ]
   "duration": 5    }
      },
      "for7MW": {
],         "adaptiveStresstrigger01": {
          "strengthcategory": 0.2"achievement",
          "cardiotriggerType": 0.9"activeDaysInWeeks",
          "metaboliccondition1": 0.6,
  4, // 4 active days
          "epoccondition2": 0.6
     8, // every week for 8 weeks
  },         "muscleStressactions": [
{            "upper": 10,{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"},
            "lower": 10,{"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
          "core": 10]
        },
      },
      "wktdef5trigger02": {
          "typecategory": 1"education",
          "titletriggerType": "Warming UptotalActivities",
          "imagecondition1": "abs",
 10, // 10 activities
          "desccondition2": "Basic"0, // Not used
          "breakDurationactions": [
5,
		"appStoreId: "workout05",            "exercises": [
{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}
         { ]
        }
  "id": "exdef2",   }
    }
    "durationtimedNotifs": 20{
      "forAfterburner": {
  },           "notif01": {
            "iddeltaHours": "exdef2"24, // Delta after APN token reg that the notif is delivered [no default]
 "duration": 15        "seqVersion": 0, // }Sequence version to allow future updates without flooding existing users ],[default:0]
          "adaptiveStresstitle": "Title {of notification", // [default:""]
          "strengthbody": 0.2,
  "Body of notification" // [no default]
       "cardio": 0.9 },
      },
      "metabolicfor7MW": 0.6,
{
         "epocnotif01": 0.6{
        },
        "muscleStressdeltaHours": {24, 
          "upperseqVersion": 100, 
          "lowertitle": 10 "Title of notification",
          "corebody": 10"Body of notification"
        },
      },
    }
  },
  "wktdef6receipts": {
        "type"user_id_01": 1,
 {
      "titlereceipt_auto_id_01": "6{
Min Strength",         "imagereceipt": "absreceipt_data", // Written by the client after an IAP "desc": "Quick workout that targets strength building, increasing your restimng metabilic rate.",
        "breakDuration": 5,
		"appStoreId: "workout06",purchase
        "validation": { // Written by the server after the receipt has been processed
          "exercisesvalidationDate": [3456789, //      Timestamp [default:0]
   {             "id"isValid": "exdef1",
            "duration": 55true [default:false]
           },
      }
   { }
           "id": "exdef4",
            "duration": 55
          },
          {
            "id": "exdef5",
            "duration": 55
          },
          {
            "id": "exdef1",
            "duration": 55
          },
          {
            "id": "exdef4",
            "duration": 55
          },
          {
            "id": "exdef5",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef7": {
        "type": 1,
        "title": "6 Min Cardio",
        "image": "abs",
        "desc": "Short workout that pushes your cardiovascular system to burn fat now and for the next 24 hours.",
        "breakDuration": 5,
		"appStoreId: "workout07",
        "exercises": [
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          },
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          },
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef8": {
        "type": 1,
        "title": "2 Min Cardio Blast",
        "image": "abs",
        "desc": "Short workout that pushes your cardiovascular system to burn fat now and for the next 24 hours.",
        "breakDuration": 5,
		"appStoreId: "workout08",
        "exercises": [
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef9": {
        "type": 1,
        "title": "2 Min Cardio Blast 2x",
        "image": "abs",
        "desc": "Short workout that pushes your cardiovascular system to burn fat now and for the next 24 hours.",
        "breakDuration": 5,
		"appStoreId: "workout09",
        "exercises": [
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      }
    }
  }
}},
}

Client-Side Data Validation & Error Handling

We apply the following process to validate data on the client and to handle the errors appropriately:

SituationActions
  • Property is missing or is wrong type
  • Property has a default defined in the model schema.
  • Log error to crashlytics.
  • Handle silently and apply default value.
  • Property is missing or is wrong type
  • Property doesn't have a default defined.
  • Log error to crashlytics.
  • Throw exception (catch the exception according to object-specific rules, see below).
  • Entire object is missing
  • Log error to crashlytics.
  • Throw exception (catch the exception according to object-specific rules, see below).

Data Validation Exception Handling

EntityChecksAction
visibleWorkoutDef
  • Missing properties without defaults.
  • Missing or invalid workout definition.
Hide from user.
exerciseDefinition
  • Missing properties without defaults.
Tell user via alert view.
timelineArticle
  • Missing properties without defaults.
Hide from user.
activity
  • Missing properties without defaults.
Tell user via alert view.
result
  • Missing properties without defaults.
Tell user via alert view.
afterburn
  • Missing properties without defaults.
Tell user via alert view.
userN/A (all properties have defaults)None