streaming a series of JSON strings over Socket

This is probably more about socket/tcp behavior, than node.js.

I am writing a server in node.js, which receives series of stringfied JSON objects over a socket (not HTTP).

The client (iOS app) streams JSON strings over this socket. The size of each JSON string varies (from a few bytes to several K bytes), so as the timing. Each JSON string will be sent with a single "write" operation.

When I receive data from a socket, I call JSON.parse().

Simple test case works great, but I am not sure if this is enough.

I am wondering if I need to worry about the following cases, (1) 'data' contains multiple JSON objects (2) a single JSON object is sent over multiple data's.

You should develop a protocol for what is the json payload and what is not. So for example over the tcp/ip socket you would write a begin character(s), then the json payload, end character(s). This way your read on the socket knows when the message begins and ends. now you for particular case wanting to handle multiple json payloads, you will need a separator character(s).

so choosing what your begin, end, and separator characters is up to you. There are numerous characters you can use. Look at a ascii/Hex table for some choices. It's best however to stick to non-printable characters. Otherwise you run into situations where the payload may contain these characters.

In the event that happens you will need to develop a another set of characters for escape sequences. That means once you define your begin, end, and separators those characters are illegal in the payload, and must be replaced by your escape sequences on the sending side. That also means the receiving side must turn those escape sequences back into the correct characters so the payload can be returned to the initial state.

so you could for example define your protocol as.

[begin]     = 0x02     // Hex for Start of text
[end]       = 0x04     // Hex for end of end of transmission
[separator] = 0x03     // Hex for end of text

or 

[begin]     = 0x0B     // Hex for Vertical Tab
[end]       = 0x1C     // Hex for file separator
[separator] = 0x1E     // Hex for record separator

Then your messages coming across the tcp/ip socket (wire) would look like (where ....... is time between messages)

[begin][json payload][separator][end].......[begin][json payload][seperator][json payload][separator][json payload][separator][end].......

so you would have to write your code to read on the wire until a begin is found. Then store the payload until a separator is found. Then if the next character after the separator is not end charter loop and store next payload.

I would also suggest searching google for MLLP (Minimum Lower Level Protocol).

Here is very complete explanation of this problem, with solutions and even code.