1# Data and Event Configuration 2 3 4Use the JSON file to configure the variables and events for service widgets. Declare the variables in the **data** field and events in the **actions** field. 5 6 7Example: 8 9 10 11```json 12{ 13 "data": { 14 "temperature": "35°C", 15 "city": "hangzhou" 16 }, 17 "actions": { 18 "routerEventName": { 19 "action": "router", 20 "abilityName": "com.example.myapplication.FormAbility", 21 "params": { 22 "message": "weather", 23 "temperature": "{{temperature}}" 24 } 25 }, 26 "messageEventName": { 27 "action": "message", 28 "params": { 29 "message": "weather update" 30 } 31 } 32 } 33} 34``` 35 36For details, see [input](./js-service-widget-basic-input.md) and [list](js-service-widget-container-list.md). 37