From: Ian Campbell Subject: Re: [PATCH V4 11/24] libxl/gentypes.py: include discriminator in JSON output Date: Tue, 6 May 2014 14:03:49 +0100 Message-ID: <1399381429.3014.124.camel@kazak.uk.xensource.com> References: <1398949101-23320-1-git-send-email-wei.liu2@citrix.com> <1398949101-23320-12-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398949101-23320-12-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-05-01 at 13:58 +0100, Wei Liu wrote: > Parser relies on the discriminator to go to correct branch. > > Signed-off-by: Wei Liu Acked-by: Ian Campbell But, an idea: What about calling the field which refers to the union by it's discriminated name, i.e. "u.pv": { map of things } instead of "type": "pv", "u" { map of things } ?