How to send Json to a webservice from pc/RPI with live data from Arduino(serial)

Hi,
I'm making a project where my plan is to take sensor input from the Arduino, and then pass that info (by serial/usb connection) through either a laptop or a Raspberry Pi and convert it to Json and send it to a webservice in asp.net c#, where it gets stored in a database, and then the data can be shown on a website, so the visitor can see live data from the Arduino sensor on the site and also be able to see what the sensor measured yesterday, last month, or the average for a extended period of time, or a graph.

It might be easier to illustrate what I'm talking about:

The PC / RPI part is optional, it can be using either one.

There are a few options, as I see it, as to which methods could work. But I am unsure about how to implement them and what programs to use for it.

First one is to log data to a file on the PC/RPI and then have some shell script either listen for changes and then combine a Json string with the newly added info to the file and send it of to the webservice.

Second one is to somehow take the Serial data from the Arduino and have some shell script or program listen for any data coming from the Arduino and converting it to Json, and sending it of to the webservice. The pro's by this method would be omitting the extra "file-step", but it would make the system more vulnerable to any interruptions in the connection.

Does anyone have experience with doing something like this? Or maybe have an idea how I can do what I'm trying to do ? Or just a nudge in the right direction, as to which approach you think is best, or what programs I could/should use.
Any help is very much appreciated!

Best regards
Daniel

If reliability is an issue, then the file method would make more sense. However, that only covers the communication between the PC and the Web server. What about the incoming data from the Arduino? It's conceivable that the something could happen before you write the file. To make it fully secure, you'd have to implement some kind of hand-shake between the PC and the Arduino. That is, you receive incoming data on the PC, write it to a file and send an acknowledgement to the Arduino. The Arduino shouldn't let go of the data until the ack is received and retry sending it at regular intervals.