json_group_array

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

json_group_array

TJ O'Donnell
I was expecting the json_group_array aggregate function to leave out null,
behaving like other aggregate functions.  Is this to be expected?

sqlite> create table x (a integer);
sqlite> insert into x values (1), (2), (null),(4);
sqlite> select group_concat(a), json_group_array(a) from x;
group_concat(a)  json_group_array(a)
---------------  -------------------
1,2,4            [1,2,null,4]

TJ O'Donnell
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

Richard Hipp-3
On 2/4/16, TJ O'Donnell <[hidden email]> wrote:
> I was expecting the json_group_array aggregate function to leave out null,
> behaving like other aggregate functions.  Is this to be expected?
>
> sqlite> create table x (a integer);
> sqlite> insert into x values (1), (2), (null),(4);
> sqlite> select group_concat(a), json_group_array(a) from x;
> group_concat(a)  json_group_array(a)

If I did that, then it would be impossible to generate a JSON array
using json_group_array() that contained NULL entries.  As it is, you
can usually include or omit the NULL entries using a term in the WHERE
clause:

     select json_group_array(a) from x where x is not null;


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

TJ O'Donnell
I can't argue for the correctness of including nulls in aggregate functions
or not.
It truly is an arbitrary decision meant for standards-makers.  Yet, most
aggregate
function do not include nulls.  Interestingly, some SQL's do include them
in count()
but sqlite does not.  In my example table, select count(a) from x returns 3,
but select count(*) from x returns 4 even though a is the only column.
I haven't tried every sqlite agg, but I think they all exclude null, except
json_group_array
and json_group_object.

In my case, I'd sure like to NOT have nulls included, but I understand
needing nulls in JSON.  I'm having a hard time excluding null with a where
clause,
as you suggested, since my actual query is the results of an intentional
left join
that results in rows from one table that are null.  If I do a normal join
or exclude
nulls with a where clause, I don't get all the rows from the other table
that I require.

As a side issue here, but important still I think, what should json(null)
mean?
In my table x, select json(a) from x returns valid json integers for
non-null rows,
but return a sql null (a blank from command-llne sqlite) not a json null
(which would
be the string null) when a is null.  In other words, json(null) returns
null,
not 'null'.

I know the json stuff is new in sqlite, but I think it's worth getting
these issues worked
out, considering how useful json has become.

TJ O'Donnell

On Thu, Feb 4, 2016 at 4:54 PM, Richard Hipp <[hidden email]> wrote:

> On 2/4/16, TJ O'Donnell <[hidden email]> wrote:
> > I was expecting the json_group_array aggregate function to leave out
> null,
> > behaving like other aggregate functions.  Is this to be expected?
> >
> > sqlite> create table x (a integer);
> > sqlite> insert into x values (1), (2), (null),(4);
> > sqlite> select group_concat(a), json_group_array(a) from x;
> > group_concat(a)  json_group_array(a)
>
> If I did that, then it would be impossible to generate a JSON array
> using json_group_array() that contained NULL entries.  As it is, you
> can usually include or omit the NULL entries using a term in the WHERE
> clause:
>
>      select json_group_array(a) from x where x is not null;
>
>
> --
> D. Richard Hipp
> [hidden email]
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

Hick Gunter
That is because count(a) and count(*) means two different things. The first counts values, the second counts rows.

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von TJ O'Donnell
Gesendet: Freitag, 05. Februar 2016 05:34
An: Richard Hipp
Cc: SQLite mailing list
Betreff: Re: [sqlite] json_group_array

I can't argue for the correctness of including nulls in aggregate functions or not.
It truly is an arbitrary decision meant for standards-makers.  Yet, most aggregate function do not include nulls.  Interestingly, some SQL's do include them in count() but sqlite does not.  In my example table, select count(a) from x returns 3, but select count(*) from x returns 4 even though a is the only column.
I haven't tried every sqlite agg, but I think they all exclude null, except json_group_array and json_group_object.

In my case, I'd sure like to NOT have nulls included, but I understand needing nulls in JSON.  I'm having a hard time excluding null with a where clause, as you suggested, since my actual query is the results of an intentional left join that results in rows from one table that are null.  If I do a normal join or exclude nulls with a where clause, I don't get all the rows from the other table that I require.

As a side issue here, but important still I think, what should json(null) mean?
In my table x, select json(a) from x returns valid json integers for non-null rows, but return a sql null (a blank from command-llne sqlite) not a json null (which would be the string null) when a is null.  In other words, json(null) returns null, not 'null'.

I know the json stuff is new in sqlite, but I think it's worth getting these issues worked out, considering how useful json has become.

TJ O'Donnell

On Thu, Feb 4, 2016 at 4:54 PM, Richard Hipp <[hidden email]> wrote:

> On 2/4/16, TJ O'Donnell <[hidden email]> wrote:
> > I was expecting the json_group_array aggregate function to leave out
> null,
> > behaving like other aggregate functions.  Is this to be expected?
> >
> > sqlite> create table x (a integer);
> > sqlite> insert into x values (1), (2), (null),(4); select
> > sqlite> group_concat(a), json_group_array(a) from x;
> > group_concat(a)  json_group_array(a)
>
> If I did that, then it would be impossible to generate a JSON array
> using json_group_array() that contained NULL entries.  As it is, you
> can usually include or omit the NULL entries using a term in the WHERE
> clause:
>
>      select json_group_array(a) from x where x is not null;
>
>
> --
> D. Richard Hipp
> [hidden email]
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: [hidden email]

This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

R Smith
In reply to this post by TJ O'Donnell


On 2016/02/05 6:34 AM, TJ O'Donnell wrote:

> I can't argue for the correctness of including nulls in aggregate functions
> or not.
> It truly is an arbitrary decision meant for standards-makers.  Yet, most
> aggregate
> function do not include nulls.  Interestingly, some SQL's do include them
> in count()
> but sqlite does not.  In my example table, select count(a) from x returns 3,
> but select count(*) from x returns 4 even though a is the only column.
> I haven't tried every sqlite agg, but I think they all exclude null, except
> json_group_array
> and json_group_object.

I think you are mistaken in your understanding. While JSON has some
rules and some conventions, when used inside an SQL engine, the rules of
SQL needs to be adhered to before any "convention" of JSON.
Not showing Null values in JSON is a convention, not a rule. (Else, why
else would json even need the 'NULL' construct?)

Further to this, in SQL, how would you know how many elements are
present in a json array and which of them are null if there is no way to
output them? Agreed, sometimes it isn't needed to know, but then you are
welcome to exclude them via the WHERE clause.

You are also mistaken about the SQL convention and SQLite-specific
operations re. Nulls - If I have a table t with one single column "a"
with 3 rows (2 text values and one null value) then doing SELECT
COUNT(a) FROM t; will show 2 and SELECT COUNT(*) FROM t; will show 3, as
it should - yes, even though a is the only column. The * doesn't mean
"a", even if the only column is "a". It means "all the DB rows" and so
include nulls. (The standard might be hazy on this, I didn't check, but
this is definitely how SQLite works, and not as you suggested).

This is also very important. Sometimes we'd want to know how many rows
are in the DB, not JUST which non-null rows are in the only column in
the DB - that is why we can decide to use either COUNT(a) or COUNT(*),
or more deliberate with an explicit GROUP BY clause. I would never want
this convention to be altered.


> As a side issue here, but important still I think, what should json(null)
> mean?
> In my table x, select json(a) from x returns valid json integers for
> non-null rows,
> but return a sql null (a blank from command-llne sqlite) not a json null
> (which would
> be the string null) when a is null.  In other words, json(null) returns
> null,
> not 'null'.

Here I'm with you - the null should output 'null'
(Devs: I'm guessing this might be an oversight in the CLI rather than
the SQL engine?)

> I know the json stuff is new in sqlite, but I think it's worth getting
> these issues worked
> out, considering how useful json has become.

Right you are, but first the issues need discovery - which is what is
happening in this very thread. :)


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

J Decker
I think maybe it would be more appropriate to return a blank element.
It would fill an index point, but be skipped and unused in cases of
iterating the loop...

http://www.2ality.com/2013/07/array-iteration-holes.html

Was thinking that javascript forEach et al. methods skipped null (or
undefined actually).

Hmm... but then again

-------------
var array = [1,2,,3];
console.log( JSON.stringify( array ) );
---------
outut : [1,2,null,3]

--------------

Or more completely
------------------

var array = [1,2,,3];
console.log( JSON.stringify( array ) );
var result = JSON.parse( JSON.stringify( array ) );
array.forEach( (n)=>{ console.log(n) } ) ;
result.forEach( (n)=>{ console.log(n) } ) ;
---------------
output
[1,2,null,3]

1
2
3

1
2
null
3

---------------------------

So seems like having null in array for JSON is perfectly expected.



On Thu, Feb 4, 2016 at 11:55 PM, R Smith <[hidden email]> wrote:

>
>
> On 2016/02/05 6:34 AM, TJ O'Donnell wrote:
>>
>> I can't argue for the correctness of including nulls in aggregate
>> functions
>> or not.
>> It truly is an arbitrary decision meant for standards-makers.  Yet, most
>> aggregate
>> function do not include nulls.  Interestingly, some SQL's do include them
>> in count()
>> but sqlite does not.  In my example table, select count(a) from x returns
>> 3,
>> but select count(*) from x returns 4 even though a is the only column.
>> I haven't tried every sqlite agg, but I think they all exclude null,
>> except
>> json_group_array
>> and json_group_object.
>
>
> I think you are mistaken in your understanding. While JSON has some rules
> and some conventions, when used inside an SQL engine, the rules of SQL needs
> to be adhered to before any "convention" of JSON.
> Not showing Null values in JSON is a convention, not a rule. (Else, why else
> would json even need the 'NULL' construct?)
>
> Further to this, in SQL, how would you know how many elements are present in
> a json array and which of them are null if there is no way to output them?
> Agreed, sometimes it isn't needed to know, but then you are welcome to
> exclude them via the WHERE clause.
>
> You are also mistaken about the SQL convention and SQLite-specific
> operations re. Nulls - If I have a table t with one single column "a" with 3
> rows (2 text values and one null value) then doing SELECT COUNT(a) FROM t;
> will show 2 and SELECT COUNT(*) FROM t; will show 3, as it should - yes,
> even though a is the only column. The * doesn't mean "a", even if the only
> column is "a". It means "all the DB rows" and so include nulls. (The
> standard might be hazy on this, I didn't check, but this is definitely how
> SQLite works, and not as you suggested).
>
> This is also very important. Sometimes we'd want to know how many rows are
> in the DB, not JUST which non-null rows are in the only column in the DB -
> that is why we can decide to use either COUNT(a) or COUNT(*), or more
> deliberate with an explicit GROUP BY clause. I would never want this
> convention to be altered.
>
>
>> As a side issue here, but important still I think, what should json(null)
>> mean?
>> In my table x, select json(a) from x returns valid json integers for
>> non-null rows,
>> but return a sql null (a blank from command-llne sqlite) not a json null
>> (which would
>> be the string null) when a is null.  In other words, json(null) returns
>> null,
>> not 'null'.
>
>
> Here I'm with you - the null should output 'null'
> (Devs: I'm guessing this might be an oversight in the CLI rather than the
> SQL engine?)
>
>> I know the json stuff is new in sqlite, but I think it's worth getting
>> these issues worked
>> out, considering how useful json has become.
>
>
> Right you are, but first the issues need discovery - which is what is
> happening in this very thread. :)
>
>
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

Stephan Beal-3
On Fri, Feb 5, 2016 at 11:23 AM, J Decker <[hidden email]> wrote:

> -------------
> var array = [1,2,,3];
> console.log( JSON.stringify( array ) );
> ---------
> outut : [1,2,null,3]
> ...
> So seems like having null in array for JSON is perfectly expected.
>

See also:

http://stackoverflow.com/questions/30585552/how-to-represent-an-array-with-empty-elements-in-json

tl;dr: "jsonlint" also says empty array elements aren't allowed.


--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

Yannick Duchêne
In reply to this post by Hick Gunter
On Fri, 5 Feb 2016 07:51:06 +0000
Hick Gunter <[hidden email]> wrote:

> That is because count(a) and count(*) means two different things. The first counts values, the second counts rows.

What if all columns of a row, are NULL?

--
Yannick Duchêne
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

Hick Gunter
The row still counts. Just like counting christmas presents before you open them. The fact that someone gave you an empty wrapper only becomes apparrent when you look inside.

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Yannick Duchêne
Gesendet: Freitag, 05. Februar 2016 12:38
An: [hidden email]
Betreff: Re: [sqlite] json_group_array

On Fri, 5 Feb 2016 07:51:06 +0000
Hick Gunter <[hidden email]> wrote:

> That is because count(a) and count(*) means two different things. The first counts values, the second counts rows.

What if all columns of a row, are NULL?

--
Yannick Duchêne
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: [hidden email]

This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

Keith Medcalf
In reply to this post by R Smith

count(*) counts the rows of the result set selected
count(column) counts the NOT NULL values in the column of the result set selected
count(DISTINCT column) counts the number of distinct values (excluding NULLs) in the column of the result set selected

count(column IS NULL)     is equivalent to count(*) (the expression always returns true (1) or false(0)
count(column IS NOT NULL) is equivalent to count(*)  for every row so therefore all rows are counted)

sum(column IS NULL) returns the count of the number of rows in which the column is null
sum(column IS NOT NULL) returns the count of the number of rows in which the column is not null

These can be combined, so for example count(DISTINCT column) + sum(column IS NULL) returns the number of unique values in the column where NULLs are distinct.
and count(DISTINCT column) + (sum(column IS NULL) > 0) returns the number of unique values where NULLs are not distinct.

and so on and so forth

> -----Original Message-----
> From: [hidden email] [mailto:sqlite-users-
> [hidden email]] On Behalf Of R Smith
> Sent: Friday, 5 February, 2016 00:55
> To: [hidden email]
> Subject: Re: [sqlite] json_group_array
>
>
>
> On 2016/02/05 6:34 AM, TJ O'Donnell wrote:
> > I can't argue for the correctness of including nulls in aggregate
> functions
> > or not.
> > It truly is an arbitrary decision meant for standards-makers.  Yet, most
> > aggregate
> > function do not include nulls.  Interestingly, some SQL's do include
> them
> > in count()
> > but sqlite does not.  In my example table, select count(a) from x
> returns 3,
> > but select count(*) from x returns 4 even though a is the only column.
> > I haven't tried every sqlite agg, but I think they all exclude null,
> except
> > json_group_array
> > and json_group_object.
>
> I think you are mistaken in your understanding. While JSON has some
> rules and some conventions, when used inside an SQL engine, the rules of
> SQL needs to be adhered to before any "convention" of JSON.
> Not showing Null values in JSON is a convention, not a rule. (Else, why
> else would json even need the 'NULL' construct?)
>
> Further to this, in SQL, how would you know how many elements are
> present in a json array and which of them are null if there is no way to
> output them? Agreed, sometimes it isn't needed to know, but then you are
> welcome to exclude them via the WHERE clause.
>
> You are also mistaken about the SQL convention and SQLite-specific
> operations re. Nulls - If I have a table t with one single column "a"
> with 3 rows (2 text values and one null value) then doing SELECT
> COUNT(a) FROM t; will show 2 and SELECT COUNT(*) FROM t; will show 3, as
> it should - yes, even though a is the only column. The * doesn't mean
> "a", even if the only column is "a". It means "all the DB rows" and so
> include nulls. (The standard might be hazy on this, I didn't check, but
> this is definitely how SQLite works, and not as you suggested).
>
> This is also very important. Sometimes we'd want to know how many rows
> are in the DB, not JUST which non-null rows are in the only column in
> the DB - that is why we can decide to use either COUNT(a) or COUNT(*),
> or more deliberate with an explicit GROUP BY clause. I would never want
> this convention to be altered.
>
>
> > As a side issue here, but important still I think, what should
> json(null)
> > mean?
> > In my table x, select json(a) from x returns valid json integers for
> > non-null rows,
> > but return a sql null (a blank from command-llne sqlite) not a json null
> > (which would
> > be the string null) when a is null.  In other words, json(null) returns
> > null,
> > not 'null'.
>
> Here I'm with you - the null should output 'null'
> (Devs: I'm guessing this might be an oversight in the CLI rather than
> the SQL engine?)
>
> > I know the json stuff is new in sqlite, but I think it's worth getting
> > these issues worked
> > out, considering how useful json has become.
>
> Right you are, but first the issues need discovery - which is what is
> happening in this very thread. :)
>
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: json_group_array

Michael Falconer
I just love this list and the contained discussions. Doffing my cap to
Keith and his succinct and very useful summary of the subtle differences
regarding aggregate type functions. Especially like the nested stuff, which
I must admit had not really occurred to me. Nice stuff Keith and thanks for
sharing that info. It also clarifies the underlying fact that these
functions are often slightly misunderstood even by experienced SQL hacks.


On 6 February 2016 at 07:24, Keith Medcalf <[hidden email]> wrote:

>
> count(*) counts the rows of the result set selected
> count(column) counts the NOT NULL values in the column of the result set
> selected
> count(DISTINCT column) counts the number of distinct values (excluding
> NULLs) in the column of the result set selected
>
> count(column IS NULL)     is equivalent to count(*) (the expression always
> returns true (1) or false(0)
> count(column IS NOT NULL) is equivalent to count(*)  for every row so
> therefore all rows are counted)
>
> sum(column IS NULL) returns the count of the number of rows in which the
> column is null
> sum(column IS NOT NULL) returns the count of the number of rows in which
> the column is not null
>
> These can be combined, so for example count(DISTINCT column) + sum(column
> IS NULL) returns the number of unique values in the column where NULLs are
> distinct.
> and count(DISTINCT column) + (sum(column IS NULL) > 0) returns the number
> of unique values where NULLs are not distinct.
>
> and so on and so forth
>
> > -----Original Message-----
> > From: [hidden email] [mailto:sqlite-users-
> > [hidden email]] On Behalf Of R Smith
> > Sent: Friday, 5 February, 2016 00:55
> > To: [hidden email]
> > Subject: Re: [sqlite] json_group_array
> >
> >
> >
> > On 2016/02/05 6:34 AM, TJ O'Donnell wrote:
> > > I can't argue for the correctness of including nulls in aggregate
> > functions
> > > or not.
> > > It truly is an arbitrary decision meant for standards-makers.  Yet,
> most
> > > aggregate
> > > function do not include nulls.  Interestingly, some SQL's do include
> > them
> > > in count()
> > > but sqlite does not.  In my example table, select count(a) from x
> > returns 3,
> > > but select count(*) from x returns 4 even though a is the only column.
> > > I haven't tried every sqlite agg, but I think they all exclude null,
> > except
> > > json_group_array
> > > and json_group_object.
> >
> > I think you are mistaken in your understanding. While JSON has some
> > rules and some conventions, when used inside an SQL engine, the rules of
> > SQL needs to be adhered to before any "convention" of JSON.
> > Not showing Null values in JSON is a convention, not a rule. (Else, why
> > else would json even need the 'NULL' construct?)
> >
> > Further to this, in SQL, how would you know how many elements are
> > present in a json array and which of them are null if there is no way to
> > output them? Agreed, sometimes it isn't needed to know, but then you are
> > welcome to exclude them via the WHERE clause.
> >
> > You are also mistaken about the SQL convention and SQLite-specific
> > operations re. Nulls - If I have a table t with one single column "a"
> > with 3 rows (2 text values and one null value) then doing SELECT
> > COUNT(a) FROM t; will show 2 and SELECT COUNT(*) FROM t; will show 3, as
> > it should - yes, even though a is the only column. The * doesn't mean
> > "a", even if the only column is "a". It means "all the DB rows" and so
> > include nulls. (The standard might be hazy on this, I didn't check, but
> > this is definitely how SQLite works, and not as you suggested).
> >
> > This is also very important. Sometimes we'd want to know how many rows
> > are in the DB, not JUST which non-null rows are in the only column in
> > the DB - that is why we can decide to use either COUNT(a) or COUNT(*),
> > or more deliberate with an explicit GROUP BY clause. I would never want
> > this convention to be altered.
> >
> >
> > > As a side issue here, but important still I think, what should
> > json(null)
> > > mean?
> > > In my table x, select json(a) from x returns valid json integers for
> > > non-null rows,
> > > but return a sql null (a blank from command-llne sqlite) not a json
> null
> > > (which would
> > > be the string null) when a is null.  In other words, json(null) returns
> > > null,
> > > not 'null'.
> >
> > Here I'm with you - the null should output 'null'
> > (Devs: I'm guessing this might be an oversight in the CLI rather than
> > the SQL engine?)
> >
> > > I know the json stuff is new in sqlite, but I think it's worth getting
> > > these issues worked
> > > out, considering how useful json has become.
> >
> > Right you are, but first the issues need discovery - which is what is
> > happening in this very thread. :)
> >
> >
> > _______________________________________________
> > sqlite-users mailing list
> > [hidden email]
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>



--
Regards,
     Michael.j.Falconer.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users