This project is read-only.
1
Vote

Unexpected token

description

Getting the following error:
 
Invoke-Expression : Unexpected token ':"Login is successful."' in expression or statement.
At C:\Users\jake\Documents\My Dropbox\Jake\code\git\xsigo-powershell\xsigo-functions.ps1:123 char:40
  • $result | Invoke-Expression <<<<
    • CategoryInfo : ParserError: (:"Login is successful.":String) [Invoke-Expression], ParseExc
      eption
    • FullyQualifiedErrorId : UnexpectedToken,Microsoft.PowerShell.Commands.InvokeExpressionCommand
       
      for this data:
       
      {"message":"Login is successful.","username":"administrator","status":"pass","roles":["operator"],"domain":"de
      fault","loggedIn":true}

comments

jakerobinson wrote Mar 2, 2011 at 3:43 PM

error demonstrated by:

$jsondata | ConvertFrom-Json

wrote Feb 14, 2013 at 7:31 PM