← Back to team overview

zorba-coders team mailing list archive

Re: [Merge] lp:~paul-lucas/zorba/feature-json_strip_array into lp:zorba

 

> 1. Would it be possible to add tests to cover the new jsoniq-strip-top-level-
> array flag?

Done.

> 2. I am wondering if the behaviour with both flags set should not be to strip
> all top-level arrays, not just the first one. For example:
> 
> jn:parse-json(
>   '[ 1, 2, 3 ][ 4, 5, 6 ]',
>   {
>     "jsoniq-multiple-top-level-items" : true,
>     "jsoniq-strip-top-level-array" : true
>   })
> 
> returns 1 2 3[4, 5, 6]
> 
> but I would expect 1 2 3 4 5 6.

Done.

> 3. I am under the impression that we use different terminologies in Zorba to
> describe the same behaviour ('skip', 'strip', I also saw 'chop' in a
> discussion). It would be nice if we could unify, not sure if still possible
> though.

To me, "skip" and "strip" mean slightly different things:

* "skip" means to skip over unrelated items in something like a stream or list.

* "strip" means to remove possibly related items, e.g., the beginning '[' and ending ']' of a JSON array.

* I personally haven't seen "chop," but that means to remove something from the end only.
-- 
https://code.launchpad.net/~paul-lucas/zorba/feature-json_strip_array/+merge/136826
Your team Zorba Coders is subscribed to branch lp:zorba.


References