A valid JSON Syntax is something of the kind:
{
"username": "admin",
"password": "123"
}
But what if I want to transmit an array of 'users' (given the example), instead of a single 'user' ?
Is the code below Valid JSON, according to the specifications?
[{
"username": "admin",
"password": "123"
}, {
"username": "bbvb",
"password": "sdfsdf"
}, {
"username": "asd",
"password": "222"
}]
And if not, what is the best way to transmit an array of values across with JSON? (And with 'best way', I mean syntactically)
Yes, your example is valid JSON - that is exactly how you want to use an array.