Naming URL and JSON components

These are some simple visuals I quickly threw together. I hope they will help to improve conversations which will lead to better-informed decisions. In IT we have a habit of using lots of names for exactly the same thing, which frequently leads to longer and more confusing conversations! I hope the visual breakdown of URLs and JSON objects into their constituent parts will be of benefit to newbies and non-techies alike.

JSON Example

original.png

  • Object/JSON object – they start with { and end with }
  • Property or Key/Value pair – a combination of keys and values
  • Key – this is always a String. It is used to identify and retrieve the associated value
  • Value – this can either a
    • String
    • Number
    • Object
    • Array
  • Payload/Body/Request/Response body – everything listed above is contained in payload/body

URL Example

Below is an example of a URL broken down into its’ smallest elements. I have also listed some of the common names people use to refer to specific parts of a URL.

Screen Shot 2019-05-01 at 19.50.44

I couldn’t fit “URL fragment” into the above example so I included it below

Screen Shot 2019-05-01 at 19.50.59

  • Protocol
    • below are some other popular protocols
  • Subdomain
    • As you will probably have figured out by now “www” is also just a another subdomain. Google cleverly use subdomains to organise their different products into easy to remember URLs
      •  mail.google.com
      • play.google.com
      • music.google.com
  • Domain
    • Everyone should be very familiar with this concept but you may not have been aware of it’s precise name. Sometimes people use this term interchangeably with Host or Hostname
  • TLD (Top Level Domain)
    • it’s not very often you will need to refer to this but I’ve included it for completeness
  • Host/Hostname
    • same comment as I wrote for “Domain” above
  • Path
    • this is just the folder structure of the application/service. It’s the path the application/service takes to navigates to the correct resource (usually a HTML, CSS, Javascript, JSON or image file)
  • Query string/query parameter/parameter(s)
    • this is how you can pass additional values to your service. It’s pretty common for GET requests 
  • URL Fragment
    • this is commonly used to anchor to a particular part/section of a webpage
  •  URL/Endpoint
    • “URL” is generally used when referring to a websites
    • “Endpoint” is usually used when talking about services 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.