$ echo foo | gpgme-json error reading request: request too long (166 MiB) $ echo '{"foo":0}' | gpgme-json error reading request: request too long (1782 MiB) $
foo is clearly not 166 MiB in length, and {"foo":0} is not 1782 MiB.
$ echo foo | gpgme-json error reading request: request too long (166 MiB) $ echo '{"foo":0}' | gpgme-json error reading request: request too long (1782 MiB) $
foo is clearly not 166 MiB in length, and {"foo":0} is not 1782 MiB.
The default mode of the tool is to use the Native Messaging protocol which prefixes requests and responses with a 32 bit native endian length header. It is the default due to the way browsers call native messaging programs. If you want to use it in a different way, use the option --single or --interactive.