% appendix
\chapter{JSON Output from Django Server}
\label{sec:appendix_jsonoutput}

%\lstinputlisting[]{} % for source code files directly
% lstlisting environment for direct inclusion
\begin{lstlisting}[]
{
   "pages":[
      {
         "page_name":"Home Page",
         "sections":[
            {
               "label":"Header",
               "elements":[
                  {
                     "type":"navigation_bar",
                     "label":"Navigation Menu",
                     "items":[
                        "Home",
                        "Login",
                        "Register"
                     ]
                  }
               ]
            },
            {
               "label":"Login Form",
               "elements":[
                  {
                     "type":"form",
                     "label":"Login Form",
                     "inputs":[
                        {
                           "type":"text",
                           "label":"Username"
                        },
                        {
                           "type":"text",
                           "label":"Password"
                        },
                        {
                           "type":"button",
                           "label":"Login"
                        }
                     ]
                  }
               ]
            },
            {
               "label":"Registration Form",
               "elements":[
                  {
                     "type":"form",
                     "label":"Registration Form",
                     "inputs":[
                        {
                           "type":"text",
                           "label":"Name"
                        },
                        {
                           "type":"text",
                           "label":"Email"
                        },
                        {
                           "type":"text",
                           "label":"Password"
                        },
                        {
                           "type":"button",
                           "label":"Register"
                        }
                     ]
                  }
               ]
            },
            {
               "label":"Footer",
               "elements":[
                  
               ]
            }
         ]
      },
      {
         "page_name":"Customer Dashboard",
         "sections":[
            {
               "label":"Header",
               "elements":[
                  {
                     "type":"navigation_bar",
                     "label":"Navigation Menu",
                     "items":[
                        "Home",
                        "Profile",
                        "Support Tickets"
                     ]
                  }
               ]
            },
            {
               "label":"Profile Information",
               "elements":[
                  {
                     "type":"text",
                     "label":"Name",
                     "content":"John Doe"
                  },
                  {
                     "type":"text",
                     "label":"Email",
                     "content":"johndoe@example.com"
                  },
                  {
                     "type":"list",
                     "label":"Purchased Goods",
                     "headers":[
                        "Item Name",
                        "Quantity"
                     ]
                  }
               ]
            },
            {
               "label":"Open Support Tickets",
               "elements":[
                  {
                     "type":"list",
                     "label":"Support Tickets",
                     "headers":[
                        "Ticket Number",
                        "Status",
                        "Date Opened"
                     ]
                  }
               ]
            },
            {
               "label":"Button to Open New Support Ticket",
               "elements":[
                  {
                     "type":"button",
                     "label":"Open New Support Ticket"
                  }
               ]
            },
            {
               "label":"Footer",
               "elements":[
                  
               ]
            }
         ]
      },
      {
         "page_name":"Expert Dashboard",
         "sections":[
            {
               "label":"Header",
               "elements":[
                  {
                     "type":"navigation_bar",
                     "label":"Navigation Menu",
                     "items":[
                        "Home",
                        "Profile",
                        "Support Tickets"
                     ]
                  }
               ]
            },
            {
               "label":"Profile Information",
               "elements":[
                  {
                     "type":"text",
                     "label":"Name",
                     "content":"Jane Smith"
                  },
                  {
                     "type":"text",
                     "label":"Email",
                     "content":"janesmith@example.com"
                  },
                  {
                     "type":"text",
                     "label":"Expertise",
                     "content":"Technical Support"
                  }
               ]
            },
            {
               "label":"Open Support Tickets Assigned",
               "elements":[
                  {
                     "type":"list",
                     "label":"Assigned Support Tickets",
                     "headers":[
                        "Ticket Number",
                        "Status",
                        "Date Assigned"
                     ]
                  }
               ]
            },
            {
               "label":"Button to View Details of a Support Ticket",
               "elements":[
                  {
                     "type":"button",
                     "label":"View Details of Support Ticket"
                  }
               ]
            },
            {
               "label":"Footer",
               "elements":[
                  
               ]
            }
         ]
      },
      {
         "page_name":"Manager Dashboard",
         "sections":[
            {
               "label":"Header",
               "elements":[
                  {
                     "type":"navigation_bar",
                     "label":"Navigation Menu",
                     "items":[
                        "Home",
                        "Profile",
                        "Support Tickets"
                     ]
                  }
               ]
            },
            {
               "label":"Profile Information",
               "elements":[
                  {
                     "type":"text",
                     "label":"Name",
                     "content":"Michael Johnson"
                  },
                  {
                     "type":"text",
                     "label":"Email",
                     "content":"michaeljohnson@example.com"
                  },
                  {
                     "type":"text",
                     "label":"Role",
                     "content":"Manager"
                  }
               ]
            },
            {
               "label":"Overview of Open Support Tickets",
               "elements":[
                  {
                     "type":"text",
                     "label":"Total Number of Open Tickets",
                     "content":"25"
                  },
                  {
                     "type":"text",
                     "label":"Assigned to Experts",
                     "content":"15"
                  },
                  {
                     "type":"text",
                     "label":"Pending",
                     "content":"10"
                  }
               ]
            },
            {
               "label":"Button to Assign Tickets to Experts",
               "elements":[
                  {
                     "type":"button",
                     "label":"Assign Tickets to Experts"
                  }
               ]
            },
            {
               "label":"Footer",
               "elements":[
                  
               ]
            }
         ]
      },
      {
         "page_name":"Support Ticket Details Page",
         "sections":[
            {
               "label":"Ticket Information",
               "elements":[
                  {
                     "type":"text",
                     "label":"Ticket Number",
                     "content":"12345"
                  },
                  {
                     "type":"text",
                     "label":"Status",
                     "content":"Open"
                  },
                  {
                     "type":"text",
                     "label":"Date Opened",
                     "content":"2023-01-15"
                  },
                  {
                     "type":"text",
                     "label":"Customer Details",
                     "content":"John Doe (johndoe@example.com)"
                  }
               ]
            },
            {
               "label":"Communication Thread",
               "elements":[
                  {
                     "type":"text",
                     "label":"Message 1",
                     "content":"Customer: Issue with product delivery."
                  },
                  {
                     "type":"text",
                     "label":"Message 2",
                     "content":"Expert: Will investigate and provide update."
                  }
               ]
            },
            {
               "label":"Button to Update Ticket Status",
               "elements":[
                  {
                     "type":"button",
                     "label":"Update Ticket Status"
                  }
               ]
            },
            {
               "label":"Footer",
               "elements":[
                  
               ]
            }
         ]
      },
      {
         "page_name":"Profile Page",
         "sections":[
            {
               "label":"User Information",
               "elements":[
                  {
                     "type":"text",
                     "label":"Name",
                     "content":"John Doe"
                  },
                  {
                     "type":"text",
                     "label":"Email",
                     "content":"johndoe@example.com"
                  },
                  {
                     "type":"text",
                     "label":"Role",
                     "content":"Customer"
                  }
               ]
            },
            {
               "label":"Edit Profile Form",
               "elements":[
                  {
                     "type":"form",
                     "label":"Edit Profile Form",
                     "inputs":[
                        {
                           "type":"text",
                           "label":"Name"
                        },
                        {
                           "type":"text",
                           "label":"Email"
                        },
                        {
                           "type":"text",
                           "label":"Password"
                        },
                        {
                           "type":"button",
                           "label":"Save Changes"
                        }
                     ]
                  }
               ]
            },
            {
               "label":"Footer",
               "elements":[
                  
               ]
            }
         ]
      },
      {
         "page_name":"Admin Dashboard",
         "sections":[
            {
               "label":"Header",
               "elements":[
                  {
                     "type":"navigation_bar",
                     "label":"Navigation Menu",
                     "items":[
                        "Home",
                        "Profile",
                        "Reports"
                     ]
                  }
               ]
            },
            {
               "label":"Overview of System Usage",
               "elements":[
                  {
                     "type":"text",
                     "label":"Total Customers",
                     "content":"1000"
                  },
                  {
                     "type":"text",
                     "label":"Total Experts",
                     "content":"50"
                  },
                  {
                     "type":"text",
                     "label":"Total Managers",
                     "content":"10"
                  }
               ]
            },
            {
               "label":"Button to Add New Users",
               "elements":[
                  {
                     "type":"button",
                     "label":"Add New Users"
                  }
               ]
            },
            {
               "label":"Button to View Reports and Analytics",
               "elements":[
                  {
                     "type":"button",
                     "label":"View Reports and Analytics"
                  }
               ]
            },
            {
               "label":"Footer",
               "elements":[
                  
               ]
            }
         ]
      }
   ],
   "connections":[
      {
         "from_page":"Home Page",
         "from_type":"button",
         "from_label":"Login",
         "to_page":"Customer Dashboard"
      },
      {
         "from_page":"Home Page",
         "from_type":"button",
         "from_label":"Register",
         "to_page":"Customer Dashboard"
      },
      {
         "from_page":"Customer Dashboard",
         "from_type":"button",
         "from_label":"Open New Support Ticket",
         "to_page":"Support Ticket Details Page"
      },
      {
         "from_page":"Expert Dashboard",
         "from_type":"button",
         "from_label":"View Details of Support Ticket",
         "to_page":"Support Ticket Details Page"
      },
      {
         "from_page":"Manager Dashboard",
         "from_type":"button",
         "from_label":"Assign Tickets to Experts",
         "to_page":"Expert Dashboard"
      },
      {
         "from_page":"Support Ticket Details Page",
         "from_type":"button",
         "from_label":"Update Ticket Status",
         "to_page":"Manager Dashboard"
      },
      {
         "from_page":"Profile Page",
         "from_type":"button",
         "from_label":"Save Changes",
         "to_page":"Home Page"
      },
      {
         "from_page":"Admin Dashboard",
         "from_type":"button",
         "from_label":"Add New Users",
         "to_page":"Home Page"
      },
      {
         "from_page":"Admin Dashboard",
         "from_type":"button",
         "from_label":"View Reports and Analytics",
         "to_page":"Home Page"
      },
      {
         "from_page":"Home Page",
         "from_type":"navigation_bar",
         "from_label":"Profile",
         "to_page":"Profile Page"
      },
      {
         "from_page":"Home Page",
         "from_type":"navigation_bar",
         "from_label":"Support Tickets",
         "to_page":"Customer Dashboard"
      },
      {
         "from_page":"Home Page",
         "from_type":"navigation_bar",
         "from_label":"Support Tickets",
         "to_page":"Expert Dashboard"
      },
      {
         "from_page":"Home Page",
         "from_type":"navigation_bar",
         "from_label":"Support Tickets",
         "to_page":"Manager Dashboard"
      },
      {
         "from_page":"Admin Dashboard",
         "from_type":"navigation_bar",
         "from_label":"Profile",
         "to_page":"Profile Page"
      },
      {
         "from_page":"Admin Dashboard",
         "from_type":"navigation_bar",
         "from_label":"Reports",
         "to_page":"Home Page"
      }
   ]
}
\end{lstlisting}

