Skip to content

Add default to every key #11

@talkingmoose

Description

@talkingmoose

Jamf manifests support the default keyword to pre-populate a setting. This is useful for displaying a default setting that and administrator can still change.

Here’s a basic property:

{
    "title": "Disk Manager (com.company.diskmanager)",
    "description": "Preference settings for the fictitious Disk Manager application. This manifest demonstrates different ways to format the appearance or value of properties as well as include useful options like infoText. Jamf Pro supports many but not all elements and options here: https://github.com/json-editor/json-editor.",
    "properties": {
         "diskCacheSize": {
            "title": "Disk Cache Size",
            "description": "SSet disk cache size, in bytes.",
            "property_order": 30,
            "type": "integer"
        }
    }
}

Here’s the same property with a default value of “25600".

{
    "title": "Disk Manager (com.company.diskmanager)",
    "description": "Preference settings for the fictitious Disk Manager application. This manifest demonstrates different ways to format the appearance or value of properties as well as include useful options like infoText. Jamf Pro supports many but not all elements and options here: https://github.com/json-editor/json-editor.",
    "properties": {
         "diskCacheSize": {
            "title": "Disk Cache Size",
            "description": "SSet disk cache size, in bytes.",
            "default": 25600,
            "property_order": 30,
            "type": "integer"
        }
    }
}

This change applies to all property types but will be different for boolean properties vs. fill-in-the-blank properties.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions