Adding in encode to JSON method and send over net