Drive-In Window JSON is an esolang by User:BoundedBeans capturing the semantics of Drive-In Window but in JSON format.

Namespaced IDs[edit]

A namespaced ID follows this format:

Author.ExtensionName/IndividualID

The Author, ExtensionName, and IndividualID should not contain periods or slashes.

The standard author is Diw (for Drive-In Window), which is reserved. If you go by Diw, use %Diw, if you go by %Diw, use `PDiw, if you go by `PDiw, use `GPDiw, etc. All three names should be in PascalCaseLikeThis. The characters @#$%` are also reserved for various purposes. Use `A `H `D `P `G to encode those.

If two or more authors make something together, with no particular named grouping/company/etc., they should use Combine$(author name 1)$(author name 2)$(author name 3)$(etc.) as the author.

Schema[edit]

The code is composed as a DriveInWindow.

DriveInWindow[edit]

A DriveInWindow is a JSON object with the following keys:

MenuItem[edit]

A MenuItem is a JSON object with the following keys:

Order[edit]

An Order is a JSON object with the following keys:

Command[edit]

A Command is a namespaced ID as a string. Here are the following standard keys.

ID Drive-In Window command
Diw.Standard/WouldLikeMenuItem Person N would [also|not|] like (menu item)[, with (side item)|, hold the (side item)|].
Diw.Standard/PayForOrder Person N will pay for his order!
Diw.Standard/WhatGet OK, what should Person N get?
Diw.Standard/HowHave OK, how much money should Person N have?
Diw.Standard/LetsJustDoThis

Let's just do this until Person N has no more money!

(contents)

Person N has no more money!

Diw.Standard/NeedsDollars Person N needs X dollars [more|less] for his order!
Diw.Standard/WhatPersonHas Person N would like what Person X has.
Diw.Standard/JustWait Just wait while we decide...
Diw.TC/Takeout Person N would like to get takeout. (from Drive-In Window TC)
Diw.TC/BringIn Person N would like to bring in food. (from Drive-In Window TC)
Diw.TC/Review Person N is leaving a review: . (from Drive-In Window TC)
Diw.Comment/Code Completely ignored, you can use Diw.Standard/LoopContents to comment out large blocks of code in a way that can be easily nested.

AlsoNotModifier[edit]

An AlsoNotModifier is a namespaced ID as a string.

Diw.Standard/None (no modifier)
Diw.Standard/Also also
Diw.Standard/Not not

WithHoldModifier[edit]

A WithHoldModifier is a namespaced ID as a string.

Diw.Standard/None (no modifier)
Diw.Standard/With with
Diw.Standard/Hold hold

MoreLessModifier[edit]

A MoreLessModifier is a namespaced ID as a string.

Diw.Standard/More more
Diw.Standard/Less less

Examples[edit]

Cat[edit]

{
    "Diw.Standard/RestaurantName": "The_Cats_Meow",
    "Diw.Standard/Menu": [
        {
            "Diw.Standard/DishName": "Cat Food",
            "Diw.Standard/DishPrice": 10
        }
    ],
    "Diw.Standard/Orders": [
        {
            "Diw.Standard/Command": "Diw.Standard/WouldLikeMenuItem",
            "Diw.Standard/N": 1,
            "Diw.Standard/AlsoNot": "Diw.Standard/None",
            "Diw.Standard/Item": "Cat Food"
        },
        {
            "Diw.Standard/Command": "Diw.Standard/LetsJustDoThis",
            "Diw.Standard/N": 1,
            "Diw.Standard/LoopContents" [
                {
                    "Diw.Standard/Command": "Diw.Standard/WhatGet",
                    "Diw.Standard/N": 1
                },
                {
                    "Diw.Standard/Command": "Diw.Standard/PayForOrder",
                    "Diw.Standard/N": 1
                }
            ]
        }
    ],
    "Diw.Standard/Total": 39.95
}