• Subject: Re: Handling JSON object/array nulls in DATA-INTO
  • From: Barbara Morris <bmorris@xxxxxxxxxx>
  • Date: Mon, 14 Jan 2019 08:36:29 -0500
  • Arc-authentication-results: i=1; mx.google.com; spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of rpg400@xxxxxxxxxxx) smtp.mailfrom=rpg400@xxxxxxxxxxx; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:in-reply-to:user-agent:content-transfer-encoding :mime-version:reply-to:references:message-id:lines:organization:date :subject:from:to; bh=0eMCzpbRRyTtuu0y3sToJ2GrOXGObVT/PzR3kMaNAE8=; b=C6miW7VVXuxD0u8OaMrGiBPpO9RLwKLTHS8m4EPqt79gq0LWQ+tIHWdmoEtguobCfp kJvbZ26V8NU6A6Oxi5D3rDyvN6aMlUy5R8HD3SCTxb6YnfVn/IyDjfIM3O3Y1eS42n63 xmkuu44h+7QbugZYcLWV3Ab1rGn9ADQUFbThtrRC238xkCLhMIxPYG3+jbfWH0f5mkD2 p0icv6YFhom9zk2jqdmcZYujMm9LiL6qotolkEcfbqkbXM1sPA3oZiCtY8saP5uaz98B HJvecxts4r7Awx60u7dDO4GJqdc3gW1LWwEY7dmmsAkY1o0JTd8cgejIl6EJdXq0F6m6 jLxA==
  • Arc-seal: i=1; a=rsa-sha256; t=1547473004; cv=none; d=google.com; s=arc-20160816; b=GlzG+Vld4tvebBkSS6NfYPMbUM0yT3VR/7ix+uZJtzleAmEPobqMw5BwY0UwtPhpBp vw2Yn6JZkMpwza3y85GbVAu7zIeAV67e//3UxsmDl+lLgVCx4izoKcTWPWzXS1OpOlFl Fg8R3VJXkAy8IhUkh4/VgJXqAfyDL+UOPrBlShSzL95D/g08VwYxbKwcah8R8KAkohJI 8sqj2o98KWDn3i0RNG1DO0OXGKy3AcCYFGXQfbqCOVDmTLPjycyuLu6a2Fh63URiErrz WPebu7lijtFIoOQ4C8LLyVMwJLbz5yBX7nrAprJIV3jFJ1ZIM5kLVo/fedVJM9WlvbRa a/4w==
  • List-archive: <https://archive.midrange.com/rpg400-l/>
  • List-help: <mailto:rpg400-l-request@lists.midrange.com?subject=help>
  • List-id: "RPG programming on the IBM i \(AS/400 and iSeries\)" <rpg400-l.lists.midrange.com>
  • List-post: <mailto:rpg400-l@lists.midrange.com>
  • List-subscribe: <https://lists.midrange.com/mailman/listinfo/rpg400-l>, <mailto:rpg400-l-request@lists.midrange.com?subject=subscribe>
  • List-unsubscribe: <https://lists.midrange.com/mailman/options/rpg400-l>, <mailto:rpg400-l-request@lists.midrange.com?subject=unsubscribe>

On 2019-01-13 12:34 PM, Jon Paris wrote:

It seems to need the allowextra=yes - assumedly because in the null case I guess a value is being returned by the parser that has nowhere to go.


To support "null" for a data structure the way DATA-INTO currently works, a parser would have to avoid reporting both the name and the value "null" when it encountered "null".

It would be good for someone to open an RFE to request an option to interpret the value "null" as meaning that the name was not reported at all. With that option, individual JSON parsers would not have to have any specific support for "null".

In either case, the countprefix or allowmissing option would be needed to handle the missing data.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].