A JSON array of strings is represented as a list of string values enclosed in square brackets ([]
), with each string separated by a comma. Each string is enclosed in double quotes ("
), is represented as a list of string values enclosed in square brackets ([]
), with each string separated by a comma. Each string is enclosed in double quotes ("
).
Syntax:
["string1", "string2", "string3"]
Example:
[
"apple",
"banana",
"cherry"
]
Key Points:
- Array: The entire collection is enclosed in square brackets (
[]
). - Strings: Each item in the array is a string, and strings are enclosed in double quotes (
"
). - Comma Separation: The items in the array are separated by commas.
This format represents an array containing three string elements: "apple"
, "banana"
, and "cherry"
.
- Array: The entire collection is enclosed in square brackets (
[]
). - Strings: Each item in the array is a string, and strings are enclosed in double quotes (
"
). - Comma Separation: The items in the array are separated by commas.
This format represents an array containing three string elements: "apple"
, "banana"
, and "cherry"
.