Re: conversion error (on windows)

Stefan Skoglund <[email protected]> Tue, 09 Jul 2024 17:39:44 +0200
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
I have traced the error/failure to parsejson.

I takes out a report on available interfaces using PowerShell's Get-
NedAdapter.

ie something Like this:
---
"container"
data => parsejson( execresult( "Get-NetAdapter | Convertto-json",
"powershell"));
---

It works if i for example do this:
---
"container"
data => parsejson( execresult( "Get-NetAdapter | select ifName, Description | Convertto-json", "powershell"));
---

The output from Get-NetAdapter includes 'cimclass',  which i believe causes the crash.
I could test doing a small sample (especially the key 'cimclass') which crashes and another one which doesn't.

This 3.21.5 and Windwos 10 home

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/05ed19a44683c85a272131e424a223639b9813f8.camel%40agj.net.