added msg2json utility function
Renamed msg2json to parseKeyValueMessage and moved it inline with other static functions
Merge pull request #11 from sweetpi/master

added msg2json utility function