In the context of converting to and from JSON
:
perhaps the integer
's below are just marking array index? Yet it's entirely possible to send 1,1,1 so it's not an index. the "1" might, perhaps, indicate a "depth" then?
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> ConvertTo-Json @(1)
[
1
]
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> ConvertTo-Json @(1,a)
ParserError:
Line |
1 | ConvertTo-Json @(1,a)
| ~
| Missing expression after ','.
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> ConvertTo-Json @(1,2)
[
1,
2
]
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> ConvertTo-Json @(a)
a: The term 'a' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
[]
PS /home/nicholas/powershell>
why are integers okay:
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> ConvertTo-Json @(1,3,9)
[
1,
3,
9
]
PS /home/nicholas/powershell>
but not even a single char
?
Neither it seems are String
data acceptable.