Advertisement
ginsul

Untitled

Jul 18th, 2018
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.98 KB | None | 0 0
  1. #formData holds field values
  2. {
  3.     "formData": {
  4.         "firstName": "Bob",
  5.         "lastName": "Bobbinson",
  6.         "age": "28",
  7.         "email": "bob.bobbinson@gmail.com"
  8.     }
  9. }
  10.  
  11. #dataSpec defines field types and validation
  12. {
  13.     "dataSpec": {
  14.         "firstName": {
  15.             "type": "string"
  16.         },
  17.         "lastName": {
  18.             "type": "string"
  19.         },
  20.         "age": {
  21.             "type": "integer",
  22.             "minimum": 18,
  23.             "maximum": 65
  24.         },
  25.         "email": {
  26.             "type": "string",
  27.             "format": "email"
  28.         }
  29.     }
  30. }
  31.  
  32. #chatUISpec is for the conversational UI: associates fields to widgets, adds outputOnly widgets for extra output (text, images, videos)
  33. {
  34.     "chatUISpec": {
  35.         "hello": {
  36.             "widgetId": "textField",
  37.             "widgetParams": {
  38.                 "readOnly": true,
  39.                 "value": "Hi!"
  40.             }
  41.         },
  42.         "firstName": {
  43.             "widgetId": "textField"
  44.         },
  45.         "lastName": {
  46.             "widgetId": "textField"
  47.         },
  48.         "age": {
  49.             "widgetId": "numberSlider"
  50.         },
  51.         "email": {
  52.             "widgetId": "textField"
  53.         }
  54.     }
  55. }
  56.  
  57. #same as chatUISpec
  58. {
  59.   "formUISpec": {
  60.  
  61.  
  62.   }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement