On 21 Jan 2018, at 9:22pm, petern <peter.nichvolo...@gmail.com> wrote:
> Simon. You want something like MySQL but using SQLite's shallower column > type awareness? Reference: > > https://dev.mysql.com/doc/refman/5.7/en/mysql-shell-json-output.html Just the data that is stored in the table, expressed as a JSON object, not an array. > Would you include a header variable when headers are turned on? Column > types too? Since the data should be expressed as objects, the SQL column headers get expressed as JSON property keys. Thus the names of the headers are preserved without any special measures. > Have you considered writing a reference implementation for a new mode_json > case of shell_callback to work out a practical design? It would be a waste of time. Either the development team likes my idea or it doesn’t. If it does like my idea it needs code, and it won’t want to use my code since it won’t be certain that I didn’t copy it from somewhere. I know that the idea works in some cases because I wrote my own code to do it. But my own code wasn’t in C, and I didn’t worry about possibilities like BLOBs. > The other possibility would be to upgrade json1.c to allow > update/insert/delete and readout/writeout of current table in JSON format. > Given the trouble with integrating SQLite shell into every situation, such > a readout mode for json1.c could have wider utility. I considered asking for it to appear in JSON1. I rejected that option because JSON1 is not included by default, and because if you already have access to JSON functions, you can pretty-much do what I asked for myself. I see my request as being more like another CSV input / output facility in the shell, suitable for scripting, rather than detailed flexible JSON capabilities in the API, suitable for programmers. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users