JSON: Difference between revisions
Content added Content deleted
Line 2,174: | Line 2,174: | ||
=={{header|PowerShell}}== |
=={{header|PowerShell}}== |
||
<lang PowerShell> |
|||
# JSON input is being stored in ordered hashtable. |
|||
⚫ | |||
# Ordered hashtable is available in PowerShell v3 and higher. |
|||
⚫ | |||
# ConvertFrom-Json converts a JSON-formatted string to a custom object. |
|||
# If you use the Invoke-RestMethod cmdlet there is not need for the ConvertFrom-Json cmdlet |
|||
Invoke-WebRequest -Uri "http://date.jsontest.com" | ConvertFrom-Json |
|||
</lang> |
|||
{{out}} |
|||
<lang PowerShell> |
|||
{ |
{ |
||
"foo": 1, |
"foo": 1, |
||
Line 2,184: | Line 2,192: | ||
] |
] |
||
} |
} |
||
time milliseconds_since_epoch date |
|||
---- ------------------------ ---- |
|||
12:25:25 PM 1414326325923 10-26-2014 |
|||
</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |