replace gob by json for semtech-bridge communication. cleanup of code.