Since TCP is a streaming protocol there is no sure way to seperate between the JSON messages if they are just sent as pure strings.
What netstring encoding does is simply to prepend the string with the length of the expected string followed by a : and end the string with a ,. For example 17{"hello":"world"},. The full specification can be found at http://cr.yp.to/proto/ netstrings.txt.
Since TCP is a streaming protocol there is no sure way to seperate between the JSON messages if they are just sent as pure strings.
What netstring encoding does is simply to prepend the string with the length of the expected string followed by a
:
and end the string with a,
. For example17{"hello":"world"},
. The full specification can be found at http://cr.yp.to/proto/ netstrings.txt.