Which JSON syntax is valid?

Posted by: Pdfprep Category: 350-401 Tags: , ,

Which JSON syntax is valid?
A . {“switch”: “name”: “dist1”, “interfaces”: [“gig1”, “gig2”, “gig3”]}
B . {‘switch’: (‘name’: ‘dist1’, ‘interfaces’: [‘gig1’, ‘gig2’, ‘gig3’])}
C . {“switch”: {“name”: “dist1”, “interfaces”: [“gig1”, “gig2”, “gig3”]}}
D . {/“switch/”: {/“name/”: “dist1”, /“interfaces/”: [“gig1”, “gig2”, “gig3”]}}

Answer: C

Explanation:

This JSON can be written as follows:

{

‘switch’: {

‘name’: ‘dist1’,

‘interfaces’: [‘gig1’, ‘gig2’, ‘gig3’]

}

}

Leave a Reply

Your email address will not be published.