### Collection Display Order JSON Source: https://youropinion.is/docs/survey-format Provides an example of the 'displayOrder' array for collections, specifying the sequence in which survey pages should be presented to the user. ```json "displayOrder": ["collection-id-1", "collection-id-2"] ``` -------------------------------- ### Asset Definition JSON (Options) Source: https://youropinion.is/docs/survey-format Shows an example of defining reusable 'assets', specifically an 'options' asset for predefined choices. It includes the asset's data structure with options and their display order. ```json "assets": { "options-asset-id-1": { "type": "options", "name": "Colour Options", "data": { "options": { "red": { "label": "Red" }, "blue": { "label": "Blue" }, "green": { "label": "Green" }, "yellow": { "label": "Yellow"} }, "displayOrder": ["red", "blue", "green", "yellow"] } } } ``` -------------------------------- ### Markdown Element JSON Source: https://youropinion.is/docs/survey-format An example of a 'Markdown' element type within a survey collection. It demonstrates how to include formatted text content using Markdown syntax. ```json { "type": "Markdown", "data": { "markdown": "# Welcome to the Survey!\n\nPlease answer the following questions honestly." } } ``` -------------------------------- ### Collection Definition JSON Source: https://youropinion.is/docs/survey-format Illustrates the structure of the 'collections' property within an Open Survey. It shows how to define survey pages (collections) with unique IDs, names, elements, and display order. ```json "collections": { "collection-id-1": { "name": "Collection Name", "elements": { ... }, "displayOrder": [ ... ] }, "collection-id-2": { "name": "Another Collection", "elements": { ... }, "displayOrder": [ ... ] } } ``` -------------------------------- ### SelectOne Question Type JSON Structure - Youropinion LLM Source: https://youropinion.is/docs/survey-format Defines a multiple-choice question where users can select only one option. Options can be defined directly or referenced from an asset. ```json { "type": "SelectOne", "data": { "label": "The question as shown to the end user?", "options": { "options": { "red": { "label": "Red" }, "blue": { "label": "Blue" } }, "displayOrder": ["red", "blue"] } } } ``` -------------------------------- ### Basic Question Type JSON Structure - Youropinion LLM Source: https://youropinion.is/docs/survey-format Represents the fundamental structure for all question types in the survey. It includes a 'type' and a 'data' object, with 'data.label' being the user-facing question text. ```json { "type": "...", "data": { "label": "The question as shown to the end user?" } } ``` -------------------------------- ### FlowControl JSON Structure - Youropinion LLM Source: https://youropinion.is/docs/survey-format Defines how survey execution proceeds, altering the linear flow. It can direct the survey to finish, cancel, or jump to a specific page based on defined conditions. ```json { "type": "FlowControl", "data": { "condition": {...}, "action": { "type": "survey-finish", "anchor": "collection id" } } } ``` -------------------------------- ### String Question Type JSON Structure - Youropinion LLM Source: https://youropinion.is/docs/survey-format Defines a text input field for user responses. It supports optional 'placeholder' text and a 'multiline' flag for multi-line text areas. ```json { "type": "String", "data": { "label": "The question as shown to the end user?", "placeholder": "Enter name", "multiline": false } } ``` -------------------------------- ### SelectMany Question Type JSON Structure - Youropinion LLM Source: https://youropinion.is/docs/survey-format Defines a multiple-choice question where users can select multiple options. An optional 'other' field can include a text input for custom responses. Options can be defined directly or referenced from an asset. ```json { "type": "SelectMany", "data": { "label": "The question as shown to the end user?", "options": { "options": { "win": { "label": "Windows" }, "mac": { "label": "macOS" } }, "displayOrder": ["win", "mac"] }, "other": true } } ``` -------------------------------- ### Open Survey JSON Structure Source: https://youropinion.is/docs/survey-format Defines the top-level structure of an Open Survey JSON object. It includes schema and readme references, collections, display order for collections, and reusable assets. ```json { "$schema": "https://youropinion.is/json-schema/0.5", "$readme": "https://youropinion.is/docs/survey-format.md", "collections": { "[collection-id]": { "name": "Collection Name", "elements": { "[element-id]": { "type": "Markdown", "data": { ... } } }, "displayOrder": [ ... ] } }, "displayOrder": [ ... ], "assets": { "[asset-id]": { "type": "options", "data": { ... } } } } ``` -------------------------------- ### Boolean Question Type JSON Structure - Youropinion LLM Source: https://youropinion.is/docs/survey-format Represents a yes/no question, typically rendered as a checkbox. The 'description' field can provide text next to the checkbox, and the 'required' property does not apply as the default value is 'no'. ```json { "type": "Boolean", "data": { "label": "The question as shown to the end user?", "description": "Yes, I agree" } } ``` -------------------------------- ### JSON Schema for Conditions Source: https://youropinion.is/json-schema/latest This schema defines the structure for representing conditional logic. It allows for defining conditions based on facts, operators, and comparison values, supporting various data types and nested structures for complex rule definitions. ```APIDOC JSON Schema for Conditions: Defines the structure for conditional logic. Schema Structure: - type: "array" items: {"$ref": "#/$defs/0"} required: ["type", "items"] - type: "object" properties: type: {const: "condition"} not: {type: "boolean"} fact: {type: "string"} operator: {type: "string"} compare: anyOf: - type: "object" properties: fact: {type: "string"} required: ["fact"] - type: "object" properties: value: {} required: ["value"] required: ["type", "fact", "operator"] $defs/0 (Array Item): - type: "object" properties: type: {const: "array"} items: {"$ref": "#/$defs/0"} required: ["type", "items"] - type: "object" properties: type: {const: "condition"} not: {type: "boolean"} fact: {type: "string"} operator: {type: "string"} compare: anyOf: - type: "object" properties: fact: {type: "string"} required: ["fact"] - type: "object" properties: value: {} required: ["value"] required: ["type", "fact", "operator"] Example Usage (Conceptual): { "type": "condition", "fact": "user_sentiment", "operator": "equals", "compare": {"value": "positive"} } { "type": "array", "items": { "type": "condition", "fact": "llm_response_quality", "operator": "greater_than", "compare": {"fact": "threshold_score"} } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.