KU

should I?

A website called should I with clear yes and no answers based on facts and science. For example, should I brush my teeth every day before I go to bed? Yes! Should I wash my hands after I use the restroom? Yes!

For this website, we need a json document. When someone goes to shouldi.github.io they will get a random question and answer but they should also be able to link to a specific question and answer and share it with the world. This json document will be huge because it needs to store each question and answer. It will also need to store full descriptions and factual basis for the answer, the slug for the url of each question, additional metadata for the html although I don't know if the meta tags can be changed on the fly with JavaScript but let's assume we can for now. Maybe even links to background images and an array for list of links backing out answer. And each node in this json document will need all of this so at the top we have an array of items and each item has question, answers, and supporting stuff. What will such a json document look like?

The JSON document for your website could look like the structure below. This structure uses an array of objects, where each object represents a single "Should I..." question and all its associated data. JSON Document Structure [ { "id": "q1", "slug": "brush-teeth-before-bed", "question": "Should I brush my teeth every day before I go to bed?", "answer": "Yes!", "summary": "Brushing before bed removes plaque and food particles accumulated during the day, preventing decay and gum disease.", "description": "It's crucial to brush your teeth before going to bed. Throughout the day, a film of plaque, a sticky bacterial substance, builds up on your teeth. If this isn't removed, the bacteria release acids that lead to tooth decay (cavities) and can contribute to gingivitis (gum inflammation). Brushing disturbs this bacterial ecosystem and removes trapped food particles, giving fluoride the best chance to strengthen enamel overnight. The American Dental Association (ADA) recommends brushing for two minutes, twice a day.", "scientificBasis": [ { "key": "Plaque removal", "value": "Reduces the overnight metabolic activity of Streptococcus mutans and other acid-producing bacteria." }, { "key": "Fluoride efficacy", "value": "Allows fluoride in toothpaste to remineralize enamel when saliva production is lowest during sleep." } ], "tags": ["health", "hygiene", "dental"], "links": [ { "text": "American Dental Association - Brush for Two Minutes, Twice a Day", "url": "https://www.ada.org/en/press-room/news-releases/2021-archive/july/brush-for-two-minutes-twice-a-day" }, { "text": "Mayo Clinic - Dental health: The key to a healthy mouth", "url": "https://www.mayoclinic.org/healthy-lifestyle/adult-health/in-depth/dental-health/art-20047467" } ], "metadata": { "title": "Should I Brush My Teeth Before Bed? | ShouldI.github.io", "metaDescription": "The definitive answer to whether you should brush your teeth every night, backed by dental science.", "openGraphImage": "/img/og-brushing.jpg" }, "backgroundImage": "/img/background-dental.jpg" },

{ "id": "q2", "slug": "wash-hands-after-restroom", "question": "Should I wash my hands after I use the restroom?", "answer": "Yes!", "summary": "Washing hands with soap and water after using the restroom significantly reduces the spread of germs and infectious diseases.", "description": "Handwashing is the single most effective way to prevent the spread of infections. After using the restroom, your hands may become contaminated with fecal bacteria like E. coli, viruses like Norovirus, and other pathogens. These germs can then be easily transferred to surfaces, food, or other people. The Centers for Disease Control and Prevention (CDC) recommends washing your hands for at least 20 seconds with soap and clean, running water to mechanically remove these microorganisms.", "scientificBasis": [ { "key": "Germ transmission", "value": "Breaks the chain of infection by removing transient flora and pathogenic microorganisms from the skin." }, { "key": "Disease prevention", "value": "Reduces the incidence of diarrheal diseases and respiratory infections." } ], "tags": ["health", "hygiene", "public-health", "disease"], "links": [ { "text": "CDC - When and How to Wash Your Hands", "url": "https://www.cdc.gov/handwashing/when-how-handwashing.html" }, { "text": "World Health Organization - Hand Hygiene", "url": "https://www.who.int/campaigns/world-hand-hygiene-day" } ], "metadata": { "title": "Should I Wash My Hands After the Restroom? | ShouldI.github.io", "metaDescription": "A factual, science-backed answer on the necessity of handwashing after using the toilet.", "openGraphImage": "/img/og-handwashing.jpg" }, "backgroundImage": "/img/background-water.jpg" } ]

Key Fields Explained

Field Type Description Purpose
id String A short, unique identifier (e.g., q1). Used for internal linking/tracking.
slug String A URL-friendly version of the question (e.g., brush-teeth-before-bed). Crucial for creating sharable, specific URLs (e.g., shouldi.github.io/#/brush-teeth-before-bed).
question String The full "Should I..." question. Main display text.
answer String The concise, single-word/phrase answer (e.g., "Yes!", "No!", "Sometimes"). Main display answer.
summary String A brief, one-sentence justification for the answer. Used for quick previews or social sharing.
description String The full, detailed explanation and context for the answer. The primary content on the page, including bold terms.
scientificBasis Array of Objects Key facts outlining the scientific/factual foundation. Structured proof points.
tags Array of Strings Keywords to categorize the question (e.g., health, finance). Used for filtering or related content.
links Array of Objects External sources backing the answer (includes text and url). Provides the factual basis/citations.
metadata Object Data for HTML tags. Allows JavaScript to dynamically update SEO/sharing information (e.g., the page title, description, and social media image).
backgroundImage String Path to an image file to be used as a background/hero image. Visual context for the question.