[aur-dev] Absence of terminating newline in RPC requests

Johannes Löthberg johannes at kyriasis.com
Thu Sep 22 18:23:25 UTC 2016


On 22/09, Alad Wenter wrote:
>JSON from the RPC interface seems to not contain a terminating newline,
>regardless of version or type specified. I am curious if there is a
>particular reason for this, as the POSIX standard defines text files to
>contain lines with terminating newlines. [1] [2]
>This is more noticeable when merging the resulting files to a valid JSON
>structure, e.g. to display the union of various search results. As a
>comparison, journalctl - json does terminate lines with a newline.

The RPC just returns whatever json_encode gave it, and doesn't do 
anything manual to the data returned.  (And they're not actually files 
at any stage, so what POSIX wants doesn't matter much. ;))

Anyway, we could definitely add it, but every json tool should 
definitely be able to handle them as it is.  Examples of ones that 

  Johannes Löthberg
  PGP Key ID: 0x50FB9B273A9D0BB5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1768 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20160922/5e54668e/attachment.asc>

More information about the aur-dev mailing list