From owner-freebsd-hackers@freebsd.org Sun Sep 9 01:38:51 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A37FE10811B6 for ; Sun, 9 Sep 2018 01:38:51 +0000 (UTC) (envelope-from rpp@ci.com.au) Received: from mippet.ci.com.au (mippet.ci.com.au [192.65.182.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mippet.ci.com.au", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E04FC80453 for ; Sun, 9 Sep 2018 01:38:49 +0000 (UTC) (envelope-from rpp@ci.com.au) Received: from mippet-2.ci.com.au (mippet-2.ci.com.au [192.168.1.254]) by mippet-dkim.ci.com.au (8.15.2/8.15.2/CE050417) with ESMTPS id w891YwOH003500 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Sun, 9 Sep 2018 11:34:59 +1000 (AEST) (envelope-from rpp@ci.com.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ci.com.au; s=jun2016; t=1536456899; bh=8fe6dA6VVtdqX0jRJpOWXMgBCqerHEI39IjvpILIhJQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=qytOB/hwxhBXvr5AZmPCStDfNCJVCeLv3eBthdn3vqZq6y1PlqBDRroHRZu7QBkH6 +mql95Yts2r57m9iw19AZdvnPDYjvcuGAPNQjMmnCUzcNE6HJxtRPdxZm/jjGzRUm1 V5txMAFFSAR88NlBLf9UHyyvVFFQf9WvQslk2mdhM5Z+vCpVuqEDSgpaCgfFUj68sY FCEQUSP8TH/ymPx/cBILweobrJiMf3zpzkuogDYcVlxZ6StG1ocjGCB5R+dVgSo6c/ wo0zCm2XNftY4V9QiqwaYViqsW6zEDbZvC1btKAL/sbihhhRYadqbeeI9OASz+t41b hKJCTpA+Pv75Q== Received: from jodi.ci.com.au (jodi.ci.com.au [192.168.1.21]) by mippet.ci.com.au (8.15.2/8.15.2/CE120917) with ESMTPS id w891YwIY003497 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 9 Sep 2018 11:34:58 +1000 (AEST) (envelope-from rpp@ci.com.au) Received: from jodi.ci.com.au (jodi.ci.com.au [192.168.1.21]) by jodi.ci.com.au (8.15.2/8.15.2) with SMTP id w891YwCf026561; Sun, 9 Sep 2018 11:34:58 +1000 (AEST) (envelope-from rpp@ci.com.au) Date: Sun, 9 Sep 2018 11:34:58 +1000 From: Richard Perini To: Matt Churchyard Cc: freebsd-hackers@freebsd.org Subject: Re: Getting valid JSON output with xo(1) Message-ID: <20180909013458.GA26493@jodi.ci.com.au> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2018 01:38:51 -0000 On Sat, Sep 08, 2018 at 02:41:10PM +0100, Matt Churchyard wrote: > Hello, > > Sorry if this is the wrong list, I wasn't sure which was the most > appropriate. > > I've been asked to look at generating machine output from vm-bhyve using > xo(1), and though it would be an interesting task. However, I'm coming > across a few issues getting valid output. I've reduced my code down to the > following example - [ ... ] I've never used xo but have used "jo" to perform similar tasks. https://github.com/jpmens/jo Its JSON only. I don't think there's a port for it, but it builds simply on FreeBSD-10 through FreeBSD-12. Richard Perini Ramico Australia Pty Ltd Sydney, Australia rpp@ci.com.au +61 2 9552 5500 ----------------------------------------------------------------------------- "The difference between theory and practice is that in theory there is no difference, but in practice there is"