Running QnA 9.5.13 on Windows 2016. Any idea why the “of json” inspector doesn’t like this json? thanks
Q: lines of file "c:\out2.text"
A: {"HostId": "123456", "Cores": "2"}
T: 7165
Q: json of file "c:\out2.text"
E: The expression could not be evaluated: class InvalidJSON
T: 1071
can you try launching a powershell command on Win10 then run the command line qna.exe rather than the Fixlet Debugger UI? That’s what I am doing and maybe you’ll see the same results
Maybe we need a little more detail about exactly how you’re running it. I wonder if you are using command lines in a way that PowerShell is interpreting the {} characters instead of passing them to QNA?
Does qna.exe require anything special in the user profile? I’m connecting to an AWS Win2016 instance and then connecting the the console via session manager which only returns me a powershell session. From there I am running qna.exe from the BES Client directory.
Fixlet Debugger drops some HKCU keys but I don’t think that qna.exe does anything funky with the profiles.
I wonder if there might be an encoding issue with your out2.txt file?
I recreated my .json file manually from my original post by copy/pasting the text and QnA inspections the json with success. So I think maybe there is some strange encoding in my file
Got it fixed. When I was finally able to open my json file up with a good text editor, I found the encoding was UCS-2 LE BOM. Getting powrshell to properly encode the output was the answer:
Sorry for bumping an old thread but I found this posting after encountering issues reading a unicode encoded json. In case it helps anyone else that finds this thread, one way I found to workaround the unicode file encoding is read the lines of the file then concatenate and cast the string as a json.
Q: jsons of file "C:\test_unicode.json"
E: The expression could not be evaluated: class InvalidJSON
Q: lines of file "C:\test_unicode.json"
A: {"HostId": "123456", "Cores": "2"}
T: 0.644 ms
I: plural file line
Q: json of concatenation " " of lines of file "C:\test_unicode.json"
A: {"Cores":"2","HostId":"123456"}
T: 0.344 ms
I: singular json value