Hi List!

I am using the JSON-RPC-server of cxxtools (from Linux Mint 
16 Petra repository; so its Debian package 'libcxxtools9' 
Version: 2.2-1).


My question:
How to append a newline to the end of the returning JSON?
(My clientlib 'bjsonrpc' requires this.)


Example:
Using the rpcserver.cpp-example I do the RPC via command 
line like this:
----------------------------------------------------------------------
sebastian@castle $
sebastian@castle $ foo='{"params":[23, 
42],"method":"add","id":1}'
sebastian@castle $
sebastian@castle $ echo $foo | nc localhost 7004
{"jsonrpc":"2.0","id":1,"result":65}sebastian@castle $ #
sebastian@castle $
----------------------------------------------------------------------
So, after "{... result:65}" there is no newline. (The 
clients works just fine, if I append it manually!)


Best regards,
Thank


-- 
Sebastian Schöne
Radiation Physics
Helmholtz-Zentrum Dresden-Rossendorf
Phone: +49 351 260 2979
[email protected]
https://www.hzdr.de

Vorstand: Prof. Dr. Dr. h. c. Roland Sauerbrey,
     Prof. Dr. Dr. h. c. Peter Joehnk
Vereinsregister: VR 1693 beim Amtsgericht Dresden


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to