Hallow[Online]

Development Blog!

The reason I made the C# JSON.NET wrapper!

leave a comment »

The reason I created the JSON.NET wrapper for Hallow[Online] is because I knew it would be simple and I needed managable packets. I wanted more than just one command being sent at a time to be possible as well. Curently I have the packets being parsed through REGEX like HTTP headers almost, not to mention how I was using String.Split() to tear all the data apart in the packets on the server side. 1 packet would be 1 command + pure string data. Now that I’m parsing JSON, it’s a usable object of commands that I can loop through and read the data of. Here’s a textagram of how it worked.

1 Packet (old way)
COMMAND, DATA
The data would look like: “value1|value2|value3”

1 Packet (new way)
COMMAND, DATA
COMMAND, DATA
COMMAND, DATA
COMMAND, DATA
The data now looks like: ‘Data_Name’ : ‘Value’, ‘Data_Name’ : ‘Value’

Advertisements

Written by FuRom

October 3, 2008 at 11:05 pm

Posted in Programming Development

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: