Login / Sign Up

Opening Times

This is the full object for opening times. It may include just an opening times type, but may also include a selection of opening times text items to render.

Structure

{
  "openType": "timescopy",
  "textItems": [	
    {
      "heading": "Mon - Thurs",
      "times": "12.00 – 22.00"
    },
    {
      "heading": "Fri - Sun",
      "times": "10.00 - 23.00",
      "note": "Last orders is 22:00"
    }
  ]
}

Properties

openType

Type : Opening Times Type - Required

Type of opening times to render. Defaults to 'na'

textItems

Type : Array of Opening Time Text Item - Optional

If the open type is set to 'timescopy' this is a list of the text items to render. Each one includes a heading and times, with optional notes

notes

Type : Rich Text / Multiline String - Optional

Extra notes which is added after all of the times items are rendered, or it open type is set to always open

Required Type Definitions

Opening Time Text Item - Reveal

This is a single item for opening times if they are set to the 'timescopy' opening times type. Each one renders the heading in bold with the times in standard text. If a note is included it renders under that specific item in smaller text.

{
  "heading": "Fri - Sun",
  "times": "10.00 - 23.00",
  "note": "Last orders is 22:00"
}

heading

Type : String - Required

Bold heading of opening time row - eg 'Monday - Friday'


times

Type : String - Required

Standard text of opening time row eg '12noon - 5pm'


note

Type : Rich Text / Multiline String - Optional

Optional addition text to add after title/times

Opening Times Type - Reveal

This is string definition to set how a menu item will behave. The options available are :
• "na" - Do not show opening times at all (default)
• "always" - Show opening times heading with 'Always Open' as a single item
• "timescopy" - Define specific opening times items

{
  "openType": "na"
}

Rich Text / Multiline String - Reveal

Acts the same as the standard String type, however If text is assumed to include line breaks then we use a place holder of #BREAK#. These will then be replaced by the relevant line breaks depending on the language, and device that is rendering the text. This is commonly used in entity copy, and addresses. Rich text should not include HTML or other markup. There should always be a contextual consideration as well - for example if you copy includes a html anchor link to 'Read More' - then simply removing the markup will then leave the text 'Read More' which will be a redundant, none clickable piece of text within the app surfaces.

{
  "textWithBullets": "This paragraph will now have two line breaks, and then a list of bullets#BREAK##BREAK#• Bullet 1#BREAK#• Bullet 2#BREAK#• Bullet 3",
  "address": "Holidaymaker App Ltd#BREAK#Stowey House#BREAK#Bridport Road#BREAK#Dorchester#BREAK#DT12SB"
}

String - Reveal

Standard JSON String - Often will have certain characters escaped depending what system is writing the JSON packet, however our parser only requires to have double quotes (") escaped. UTF-8 encoding is our standard, but others may be accepted if required. If line breaks are required in the text then the Rich Text / Multiline String type is used instead.

{
  "key1": "A string value",
  "key2": "Another string with an some \"quotes\" that need escaping",
  "arrayOfStrings": [
    "Item one as a string",
    "Item two as a string",
    "Item three as a string",
  ] 
}