Rainer Winkler
Rainer Winkler

Reputation: 565

Alexa Skill: Intent Name cannot be empty

I just tried to develop my first alexa skill with this simple code, but unfortunately it always shows me that the intent name cannot be empty. Whats wrong here? It is a parse error on line 5, but why?

{
"intents": [
  {
  "intent": "HelloIntent",
  "slots" : [
    (
        "name" : "FirstName",
        "type" : "GUEST_NAMES"
    )
  ]
}  

Upvotes: 1

Views: 92

Answers (2)

Genfood
Genfood

Reputation: 1485

The round brackets are invalid chars you need to type with the JSON syntax. Just delete them and it should be fine. An array initialised with [ and closed with ].

Do it this way:

"slots" : [
    "name" : "FirstName",
    "type" : "GUEST_NAMES"
]

Upvotes: 2

L Y E S  -  C H I O U K H
L Y E S - C H I O U K H

Reputation: 5080

Try this

{
"intents": [
  {
  "intent": "HelloIntent",
  "slots" : [
        "name" : "FirstName",
        "type" : "GUEST_NAMES"
  ]
} 

Upvotes: 0

Related Questions